But, the downside of this approach is it will not give better user experience during bulk input processing.We have got a client whose requirement is to have the validations fired only on submit because they had all other applications with similar behaviors.To avoid this effect, the client-side method Page_Client Validate should be utilized.
As a result the client's script logic won't be executed properly if it relies on postback of the page and the validation is not successful.
This little article will provide you a code snippet that makes a textbox called txt Name as required field when a checkbox with id chk Required is checked.
We make use of custom validator control to achieve this.
NET Web Controls Ad Rotator Button Button 2 Calendar Calendar 2 Calendar 3 Checkbox Checkbox List Data List Data List with styles Data List with Table Table 2 Textbox Textbox 2 Textbox 3 XML ASP. NET Data Binding Array List Radio Button List Array List Drop Down List Hashtable Radio Button List 1 Hashtable Drop Down List Sorted List Radio Button List 1 Sorted List Drop Down List XML Radiobutton List ASP.
NET Validation Controls Compare Validator Compare Validator 2 Custom Validator Range Validator Range Validator 2 Regular Expression Validator Required Field Validator Validationsummary Validationsummary 2 ASP.