Pradeep Yadav
What is difference between HTML.TEXTBOX and HTML.TEXTBOXFOR?
By Pradeep Yadav in ASP.NET on Jul 02 2017
  • Pradeep Yadav
    Jul, 2017 2

    Both Of them provide same output, however HTML.TEXTBOXFOR is strongly type and HTML.TEXTBOX is not.

    • 2
  • Bharathi Raja
    Jun, 2018 21

    The TextBoxFor is a newer MVC input extension introduced in MVC2.The main benefit of the newer strongly typed extensions is to show any errors / warnings at compile-time rather than runtime.

    • 1
  • Bharathi Raja
    Feb, 2018 6

    The typed TextBoxFor will generate your input names for you. This is usually just the property name but for properties of complex types can include an underscore such as 'customer_name' Using the typed TextBoxFor version will allow you to use compile time checking. So if you change your model then you can check whether there are any errors in your views.

    • 1
  • Dhara Patel
    Nov, 2019 18

    - HTML.TEXTBOX: when we have not use model class. - HTML.TEXTBOXFOR: when we have use model class.

    • 0

Most Popular Job Functions