Advertise with us

What is the difference between “HTML.TextBox” vs “HTML.TextBoxFor”?

Posted by  Anupam Mishra
 1512  View(s)
Rate this:
Hi Everyone,
I am using  ASP.NET MVC4 and defining a text box using HTML.TextBox html helper class .But i want to know what is difference between “HTML.TextBox” and “HTML.TextBoxFor”. Please give me a solution.

Thank you.
  1. Re: What is the difference between “HTML.TextBox” vs “HTML.TextBoxFor”?

    “HTML.TextBox” vs “HTML.TextBoxFor” both are  give the same output. “HTML.TextBoxFor” is strongly typed while “HTML.TextBox” isn’t.
    Here ,  “Html.TextBoxFor” code which creates HTML textbox using the property name ‘StudentCode” from object “m”.
    Html.TextBoxFor(m => m.StudentCode)

      Modified On Feb-04-2016 10:38:57 PM