Reputation: 1697
I have one question regarding MVC (I am new to MVC)
My question is
In MVC with Razor for textbox we write like this
@Html.TextBoxFor(m=>m.name)
Now suppose I don't want to use Razor and html helper class. I want simple html input, like this
<input type="text" name='@Model.name' value='@Model.name'>
Is the above possible somehow?
Upvotes: 4
Views: 9524
Reputation: 4914
you can use
<input type="text" name='@Html.NameFor(x => x.name)' value='@Model.name'>
Upvotes: 14