Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RequiredFieldValidator And ReSet the PAGE

Status
Not open for further replies.

olivia919

Programmer
May 19, 2005
24
US
I have a data entry form with a RequiredFieldValidator. The problem I am having is when I click CANCEL button to set the form the orginal state without putting a value in the required field. The error msg for the requiredfieldvalidator keep showing without letting me proceed with the code I write in cancel_click event.
Any ideas. Thank you for your help!!!!
 
On your "Cancel" button the the causesvalidation property to false
 
or u could use a plain old reset button (without runat="server" attached to it)...

Known is handfull, Unknown is worldfull
 
or u could use a plain old reset button (without runat="server" attached to it)...
That may or not be a good idea depending on what the poster does in their cancel event. For example, they may not want to remove all of the values that the user types in other controls (which the reset button would clear).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
The reset button will also not work if a post back occurs. Once that happens, the values remain.
 
>>The reset button will also not work if a post back occurs. Once that happens, the values remain

yup, that is correct.

when i read this:
>> I click CANCEL button to set the form the orginal state without putting a value in the required field

it just struck me to use a reset button...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top