how can i set a readonly attribute to a strongly typed checkbox? i tried the following:
<%:Html.CheckBoxFor(model => model.Field1, new {@readonly="true" })%>
i cant use开发者_如何学JAVA a disabled property because this is not posted?
You can do it using your custom javascript or jQuery, or you can set it to disabled (it will be readonly, but greyed)
new {@disabled="disabled" }
精彩评论