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
Regarding the catch 22:
If we use @disabled
, the field is not sent to the action (Mamoud)
And if we use @readonly
, the drop down bug still lets you change the value
Workaround: use @disabled
, and add the field hidden after the drop down:
@Html.HiddenFor(model => model.xxxxxxxx)
Then it is truly disabled, and sent to the to the action too.