Hi Guys
I am beginner in ASP.NET MVC4 and defining a text box using HTML.TextBox html helper class .But i want to know that what is difference between “HTML.TextBox” and “HTML.TextBoxFor”. Please help me.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vinitha TPosted Oct 29, 2021, 11:53 AM
Zack MathewsPosted Jun 4, 2016, 4:53 AM
Munesh SharmaPosted Jun 3, 2016, 5:43 AM
Ultimately they both produce the same HTML but Html.TextBoxFor() is strongly typed where asHtml.TextBox isn't.
1: @Html.TextBox("Name")
2: Html.TextBoxFor(m => m.Name)
will both produce
So what does that mean in terms of use?
Generally two things:
Rajeesh MenothPosted Jun 3, 2016, 4:57 AM