MVC-bind plain html text without using html helper and Razor

I have one question regarding MVC (I'm new to MVC)
My question is:

In MVC with Razor for a text field, we write like this:

@Html.TextBoxFor(m=>m.name) 

Now suppose I do not want to use the Razor class and html helper. i want simple html input like this

 <input type="text" name='@Model.name' value='@Model.name'> 

Is it possible somehow?

+4
source share
1 answer

you can use

 <input type="text" name='@Html.NameFor(x => x.name)' value='@Model.name'> 
+12
source

All Articles