Validating a checkbox in asp net c

By default, all validators on the web page must be successful before a postback can occur.You can limit the controls that must be validated when the Rad Combo Box performs a post-back, while still allowing other controls on the web page to be validated, by using Validation Groups.If you are using j Query 1.6 version, then you should use "prop", instead of "attr".Find out more about Nothing shocks me, I'm a Software Engineer. I live in World Wide Web and from there take care of this website.Is it a pretty common scenario to have a checkbox on a form, that is required to be checked during POST-ing of a form.This usually happens when we have a typical 'Agree to Terms and Conditions' element.When I started to play with unobtrusive Java Script validation in new ASP.NET MVC i was pretty sure that decorating boolean property with [Required] attribute will solve that issue. The key to this problem lies in interpretation of j Query validation 'required' rule.

validating a checkbox in asp net c-43validating a checkbox in asp net c-90validating a checkbox in asp net c-64validating a checkbox in asp net c-74

Your valuable feedback, question, or comments about this article are always welcome.

The validator controls including Rad Combo Box, have a Validation Group property.

The Rad Combo Box validation is activated only by those validators whose Validation Group property matches the Validation Group property of the Rad Combo Box.

When the combobox text is "- Select a City -", the validator detects an error and displays the message "You must select a city!

": When the combobox text is set to a city, the validator accepts the selection: Validates to make sure the user entered a value.

Leave a Reply