1.

What are HTML Helper methods?

Answer»

Helper methods are useful in rendering the HTML in the view. These methods will GENERATE an HTML output as a part of the view. They need less coding as it can be reused across the views, so it is advantageous over HTML ELEMENTS. The different built-in helper methods are available that can be used for GENERATING the HTML for a few most commonly used HTML elements such as dropdown list, FORM, checkbox, etc. Along with this, it is also possible to create our own helper methods for custom HTML generation.

A few STANDARD helper methods in MVC are given-below:

  • BeginForm: Used for rendering the HTML form tag
  • TextArea: Used for rendering the text area
  • TextBox: Used for rendering the text box
  • CheckBox: Used for rendering the check box
  • ListBox: Used for rendering the list box
  • DropDownList: Used for rendering the drop-down list
  • Password: Used for rendering the textBox for password input
  • Hidden: Used for rendering the hidden field
  • RadioButton: Used for rendering the radio button
  • ActionLink: Used for rendering the anchor.


Discussion

No Comment Found