I'm displaying a drop down menu using the following syntax:
@Html.DropDownListFor(model => model.Country, new SelectList(Model.CountryOptions, "Key", "Value"))
I have a Jquery statement which disabled the dd based on a check box:
$(document).ready(function () {
$("#lockRecord").click(function () {
if ($(this).attr('checked')) {
$("#Country").attr('disabled', true);
} else {
$("#Country").attr("disabled", false);
}
})
});
However, when it's submitted, the value returns as null. Have tried readonly, but it doesn't work on drop down lists.
Any suggestions?