That's exactly what i needed... thanks a lot
Main Topics
Browse All TopicsHi Expert,
I have a button! The button click even does not get fired unless there is data in a textBox as their is a RequiredFieldValidator control checking it. That's fine.
But how can I specify that i only want a particular RequiredFieldValidator to run when the button is clicked as all the RequiredFieldValidator's on the form get ran for different textBoxes and I don't want this?
So i want one RequiredFieldValidator to get run per button on the screen.
And I can't call the .Validate() method on the required RequiredFieldValidator in the click event as I don't want the click even to get fired if the specific RequiredFieldValidator does not validate
Do you get me?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: FareedPosted on 2007-06-18 at 21:05:06ID: 19313081
Hi, If your are working in Visual Studio 2005 with ASP.NET 2.0, then you can do it through Controls property named "Validator Group". Make a one group and give set that group name in all three control i.e. textbox, requiredvalidator and button for example:
idatorGrou p = "MyGroup";
TextBox1.ValidatorGroup = "MyGroup";
Button.ValidatorGroup = "MyGroup";
RequiredFieldValidator.Val
and if you are working in ASP.NET 1.1 then you should disable the all other validators through javascript. I will give you the solution but first let me know the working environment.