Element in ASP.NET MVC View
div >
January, 2019 / by Krishan Dutt Sharma It provides an easy way to Render HTML in our View.
The following is the list of Html Helper controls.
Html.Beginform
Html.EndForm
Html.Label
Html.TextBox
Html.TextArea
Html.Password
Html.DropDownList
Html.CheckBox
Html.RedioButton
Html.ListBox
Html.Hidden
Below are Strongly Type Html Helper methods, this will allow us to check compile time errors. We get Model’s Property intelligence at Runtime.
Html.LabelFor
Html.TextBoxFor
Html.TextAreaFor
Html.DropDownListFor
Html.CheckBoxFor
Html.RadioButtonFor
Html.ListBoxFor
Html.HiddenFor
Let’s dig intothe details, we have to design one registration form using above controls shown as per below screen.
Here we have Label, Textbox, Password, Radio button, DropDown, and Checkbox.
In ASP.NET Application we have Server Controls, so we just need to drag and drop from the Toolbox and design the page easily, but here in MVC Application, we don’t have Server Control so either we can use HTML or Html Helper Class Controls.
Read More