- This HTML Helper generates HTML Labels and editor elements for the properties in the model object.
- We do not need to pass the model to the helper as a parameter because it is read directly directly from the view by the helper.
Example 1 :
This is the model class for which we are using EditorForModel helper. In the above syntax we are not specifying the name of the model or the tamplate name. This overload reads the template name from the view itself.
View Reference :
We can also specify the template name as shown below.
The html helper renders the editor for all the properties.