can anyone tell me how can I make a checkbox readonly instead of disabled? For a textbox, I am using it like this.Html.CheckBoxFor(m > m.Iseighteen, new id "18", disabled "disabled" Html.DropDownListFor(model > model.FieldRefName, ViewBag.projectConditionWitRefFieldsDropdownList as SelectList I have had a number of people ask about the CheckBoxFor method, and why it renders a hidden input tag with a value of false alongside the checkbox input.Html.CheckBoxFor(m > m.IsEnabled). CheckBox read only is a simple user control that groups a number of related controls. mode.HTML can you make a checkbox readonly? Handling checkbox data. Introduction. InputExtensions.CheckBoxFor Method.
Other Versions.An HTML input element whose type attribute is set to "checkbox" for each property in the object that is represented by the specified I am doing a sort with the orderby and orderbydescending list functions but only the fields that are readonly sort correctly. html.checkboxfor not the return value of the view to the controller. You can easily do this by css. HTML :