Domanda

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?

È stato utile?

Soluzione

@Html.TextBoxFor(m => m.Value, new { id = Model.Id, name = Model.Value})
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top