i got a checkbox that i would like to be disabled ? i am using asp.net mvc 2 and jquery.
<%= Html.EditorFor(p=>p.flag) %>
public class MyModel
{
public bool flag {get;set;}
}
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.
you can either use jquery to disable your checkbox using
or if you want to do it on server side you have to fall back to checkboxfor helper like
or you can write your own editor template that can consume additionalViewData parameter of
Html.EditorFor