What are HTML helpers in MVC?

Joseph Rossignol

Total Post:6

Points:30

Posted by  Joseph Rossignol
 101  View(s)
Ratings:
Rate this:
  1. What are HTML helpers in MVC?

    The HTML helpers help you to render HTML controls in the view. For instance, if you want to display an HTML textbox on the view, below is the HTML helper code.

    <%= Html.TextBox("LastName") %>

    For the checkbox below is the HTML helper code. In this way, we have HTML helper methods for every HTML control that exists.

    <%= Html.CheckBox("Married") %>

Answer