FeatureEvents.bit_Activate = Convert.ToBoolean(collection["bit_Activate"]);
bit_Activate is checkbox ,how would i convert it to boolean above,collection is coming from the formcollection variable
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.
The easiest way to do it is probably by using ASP.NET MVC’s built-in ModelBinders, which let you take a CLR object as input to your action, and the MVC framework binds all properties for you. The only requirement is that you (by convention) name your form elements after the properties of the input object. Google “asp.net mvc model binder” for lots of information and tutorials.