Custom HTML Helpers in Asp.net MVC3 Razor
- In MVC3 Razor we have HTML helpers to render different controls.
- Instead of using these helpers we can create our own helper classes and methods and use them as we want.
- The creation of custom helpers provides flexibility to change the attributes and style of the control that renders.
Following is the list of Custom HTML Helpers :
- Label - Creates a simple label.
- Label with Model Binding - Creates a Label with Model binding.
- Textbox - Creates a simple Textbox.
- Textbox with ModelBinding - Creates a Textbox with Model binding.
- Dropdownlist - Creates a simple DropdownList.
- Dropdownlist with ModelBinding - Creates a DropdownList with Model binding.
- RadioButton - Creates a simple Radio button.
- RadioButton with Model Binding - Creates a Radio button list with Model binding.
- TextArea - Creates simple TextArea
- TextArea with Model Binding - Creates a TextArea with Model Binding
- Password - Creates simple password control i.e. input type="password".
- Password with Model Binding - Creates simple password control i.e. input type="password" with Model Binding.
- Hidden - Creates hidden input field.
- Hidden with Model Binding - Creates hidden input field with Model Binding.
https://lh6.googleusercontent.com/-Q5lMkgcmVR4/T2WEWkNi3MI/AAAAAAAACZ4/7VBYeVbx7kA/s36/01.gif
ReplyDeleteSO Nice article very useful
https://lh3.googleusercontent.com/-ilBYLLWFQJQ/T2WEiJXJ7LI/AAAAAAAACcY/bXpkIPuVUto/s36/29.gif