I have an editor template where one of the form controls is disabled:

@Html.TextBoxFor(m => m.MyField, new {@class = "form-control", disabled="disabled"})

The editor template is used in multiple views, and one view requires the textbox to be enabled, whereas in other views it needs to be disabled.

Is it possible to parameterize the template so that the control can be enabled/disabled depending on the view?

Related posts

Recent Viewed