By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,080 Members | 1,845 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,080 IT Pros & Developers. It's quick & easy.

Required Field Validator question

P: n/a
Hello,

I have a form and two buttons on it. Button1 submits the data to a database
and RequiredFieldValidator is used to make sure all the required fields are
filled up, the second button has a completely different task it basically
turns on another panel and displays some data. The problem is each time
Button2 is pressed required field validator wants the required fields to be
filled up.

The question is:

Is there a way to tell the required field validator that it only needs to
validate the form when the Button1 is pressed?

Thanks,

Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Skeptical,

Button2.CausesValidation = False

-Jeff

"Skeptical" <sk**@yahoo.com> wrote in message
news:e3**************@tk2msftngp13.phx.gbl...
Hello,

I have a form and two buttons on it. Button1 submits the data to a
database and RequiredFieldValidator is used to make sure all the required
fields are filled up, the second button has a completely different task it
basically turns on another panel and displays some data. The problem is
each time Button2 is pressed required field validator wants the required
fields to be filled up.

The question is:

Is there a way to tell the required field validator that it only needs to
validate the form when the Button1 is pressed?

Thanks,

Nov 19 '05 #2

P: n/a
Simply set the CausesValidation property of Button2 to False.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Skeptical" <sk**@yahoo.com> wrote in message
news:e3**************@tk2msftngp13.phx.gbl...
Hello,

I have a form and two buttons on it. Button1 submits the data to a
database and RequiredFieldValidator is used to make sure all the required
fields are filled up, the second button has a completely different task it
basically turns on another panel and displays some data. The problem is
each time Button2 is pressed required field validator wants the required
fields to be filled up.

The question is:

Is there a way to tell the required field validator that it only needs to
validate the form when the Button1 is pressed?

Thanks,

Nov 19 '05 #3

P: n/a
I thought it was something simple. Thanks a bunch!

"Jeff Sheldon" <ni****@gmx.net> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Skeptical,

Button2.CausesValidation = False

-Jeff

"Skeptical" <sk**@yahoo.com> wrote in message
news:e3**************@tk2msftngp13.phx.gbl...
Hello,

I have a form and two buttons on it. Button1 submits the data to a
database and RequiredFieldValidator is used to make sure all the required
fields are filled up, the second button has a completely different task
it basically turns on another panel and displays some data. The problem
is each time Button2 is pressed required field validator wants the
required fields to be filled up.

The question is:

Is there a way to tell the required field validator that it only needs to
validate the form when the Button1 is pressed?

Thanks,


Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.