What option do I need to set to make a drop down box readonly when using MVCs Html.DropDownList?
I\'ve tried things like....
Html.DropDownList(\"Type
try with @disabled and jquery, in that way you can get the value on the Controller.
Html.DropDownList("Types", Model.Types, new {@class = "your_class disabled", @disabled= "disabled" })
Add a class called "disabled" so you can enabled by searching that class(in case of multiples disabled fields), then you can use a "setTimeout" in case of not entering controller by validation attributes
submit button like this.
in case of inputs, just use @readonly="readonly"
@Html.TextBoxFor("Types",Model.Types, new { @class = "form-control", @readonly= "readonly" })