We use use HTML helpers for render HTML controls in the view. In this example we will use “HTML.TextBoxFor” is strongly typed while “HTML.TextBox” isn’t. Below is a simple HTML code which just creates a simple textbox with “StudentCode” as name.
Below is “Html.TextBoxFor” code which creates HTML textbox using the property name ‘StudentCode” from object “m”.
Html.TextBoxFor(m => m.StudentName)
In the same way we have for other HTML controls like for checkbox we have “Html.CheckBox” and “Html.CheckBoxFor”.