Frage

How do I do this using Razor?

<input type="text" id="@Model.Id" name="@Model.Value">

I am trying

@Html.TextBoxFor(m=>m.Value, ?)

Any advice how to do the above input in razor?

War es hilfreich?

Lösung

@Html.TextBoxFor(m => m.Value, new { id = Model.Id, name = Model.Value})
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top