Programming in asp.net-mvc: Making a drop down list readonly but still submitting its value on newest questions tagged asp.net-mvc – Stack Overflow

I am using the Html.DropDownList helper in ASP.NET MVC and I would like to make it read-only. Unfortunately, I also need it to submit its value on a form post.

I have found (through a similar question on SO) that using the below format will make the drop down read-only but it will not provide access to the control’s value within the controller.

Html.DropDownList("Types", Model.Types, new { @disabled = "disabled" })

Does anyone know how to make a drop down list read-only or disabled with ASP.NET MVC while also allowing it to submit with a form post?

See Answers


source: http://stackoverflow.com/questions/2858511/making-a-drop-down-list-readonly-but-still-submitting-its-value
Programming in asp.net-mvc: programming-in-asp-net-mvc



online applications demo