How do we specify the class of Html.CheckBox ?
I am trying something like this, but this doesn’t work.
@Html.CheckBox("chk_", abc.IsChecked, new { @class="checkbox" })
THanks !!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When specifying class, compiler puts a check to confirm that the bool value is not nullable, i fixed the datatype from null-able bool to bool, and it ran fine.
@Html.CheckBox(“chk_”, abc.IsChecked, new { @class=”checkbox” })