- The scaffoldColumn attribute hides a property from HTML helper such as EditorForModel and DisplayForModel.
- This attribute accepts a boolean parameter.
- With the attribute in place, EditorForModel will not render the control for property for which this attribute is set to false.
Example 1 :
In the above model class, we are using ScaffoldColumn on Age property and we are setting it to false. In View, we are rendering controls using EditorForModel HTML helper. It is expected that Age field will be hidden on UI.
In the View we have used EditorForModel helper to display controls for Register Model.
You can see that Age property is missing from the form.
Watch Video :