Click to See Complete Forum and Search --> : Group Validation controls


aquafin
February 8th, 2006, 09:48 PM
How do i group validation controls in asp.net 1.1?

That is , i have two sets of textboxes which have to be validated on clicking the respective submit buttons

Textbox1 & textbox2 should be validated on clicking button1
Textbox3 & textbox4 should be validated on clicking button2
But the required fieldvalidators fire offf for all the textboxes irrespective of the button clicked,
Any help would be apprecited,

In asp.net 2.0 there is a validation group property for buttons, but for asp.net 1.x ? how is this done?

Thanks

ITGURU
February 9th, 2006, 12:00 AM
Dear aquafin,

In ASP.NET 1.1 there is no such functionality that you can group the validation control with Button but you can have a work around for this.

The Work around for this is instead of using Any validator except Custom Validator use Custom Validator and write a Java Script function which will be called when user click on the button and set it ClientValidationFunction in your CustomValidator and in Java Script function perform all your validation which you want to do with other Validation Controls.