Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Required Field Validator question

Reply
Thread Tools

Required Field Validator question

 
 
Skeptical
Guest
Posts: n/a
 
      04-01-2005
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,



 
Reply With Quote
 
 
 
 
Jeff Sheldon
Guest
Posts: n/a
 
      04-01-2005
Skeptical,

Button2.CausesValidation = False



-Jeff

"Skeptical" <> wrote in message
news:...
> 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,
>
>
>



 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      04-01-2005
Simply set the CausesValidation property of Button2 to False.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Skeptical" <> wrote in message
news:...
> 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,
>
>
>



 
Reply With Quote
 
Skeptical
Guest
Posts: n/a
 
      04-01-2005
I thought it was something simple. Thanks a bunch!

"Jeff Sheldon" <> wrote in message
news:%...
> Skeptical,
>
> Button2.CausesValidation = False
>
>
>
> -Jeff
>
> "Skeptical" <> wrote in message
> news:...
>> 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,
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
Required Field Validator and Focus Question David Hearn ASP .Net 2 04-18-2005 03:24 PM
Required Field Validator Jim Heavey ASP .Net 0 11-14-2003 07:47 PM
Required field validator problem Do ASP .Net 3 10-23-2003 12:38 AM
Required Field Validator Client side popup Jinsong Liu ASP .Net 3 08-14-2003 07:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57