Bypassing validation on Cancel Button

M

MB

Hi,
I am doing a project which uses asp.net to develop its forms. The form
uses validation web controls to validate the data entered in text
boxes. When Cancel Button is pressed which is to exit from the current
page and go to the previous page, the validation controls activate
because data has not been entered, and the user cannot cancel. I have
used Response.Redirect(webpage) but the validations activates and
unless I enter some data CANCEL button does not work.

How to bypass these validation controls and go back to the previous
page?
Thanks
 
A

Ashish M Bhonkiya

Hi MB,

If you are not interested in getting the validators fired on cancel button u
can always set the causesvalidation of the cancel button to false.

Other Option is to disable the validators on the click of cancel button.
This you need to do it on the client (required in IE Browser) and the server
(for Other Browsers) both.

Regards
Ashish M Bhonkiya
 
G

Guest

hi
set causesvalidation = false for the cancel button and it will not validate the form on click
regard
srini
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top