Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Bypass validation on cancel

 
Thread Tools Search this Thread
Old 06-30-2003, 06:21 PM   #1
Default Bypass validation on cancel


Can anyone point me to some documentation on bypassing validation controls
when a user selects cancel?

What I have is a user control with a form to fill out information on a
subject. The user should be presented with two buttons a "Submit" and a
"Cancel". When the "Cancel" button is selected all of the items on the user
control should be cleared. However, I have validation controls setup for
each item necessary on the form and when hitting cancel all of the
validation controls activate preventing cancel from being activated. How
can I make this button "bypass" the validation sequence so that just the
form is cleared?

This seems like it would need to be a javascript handled event on the client
side so that it acts like a 'clear' method and doesn't actually submit
anything. I could write that in to the application but I'm wondering if
there is a way to do this in ASP.NET "style" without having to introduce
javascript.

Thanks,
Corey




Corey Olsen
  Reply With Quote
Old 06-30-2003, 06:33 PM   #2
Jurjen de Groot
 
Posts: n/a
Default Re: Bypass validation on cancel
Corey,

I had the same problem but if you set the CauseValidation property of the
cancel button to False your problem is solved.

regards,

Jurjen de Groot
G.I.T.S. Netherlands

"Corey Olsen" <> wrote in message
news:e$...
> Can anyone point me to some documentation on bypassing validation controls
> when a user selects cancel?
>
> What I have is a user control with a form to fill out information on a
> subject. The user should be presented with two buttons a "Submit" and a
> "Cancel". When the "Cancel" button is selected all of the items on the

user
> control should be cleared. However, I have validation controls setup for
> each item necessary on the form and when hitting cancel all of the
> validation controls activate preventing cancel from being activated. How
> can I make this button "bypass" the validation sequence so that just the
> form is cleared?
>
> This seems like it would need to be a javascript handled event on the

client
> side so that it acts like a 'clear' method and doesn't actually submit
> anything. I could write that in to the application but I'm wondering if
> there is a way to do this in ASP.NET "style" without having to introduce
> javascript.
>
> Thanks,
> Corey
>
>





Jurjen de Groot
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give email validation inside a textbox in C# windows application(VS 2005)? Vayalumkal Software 1 10-14-2008 07:28 PM
How we can do validation with velocity macro tags HemantS Software 0 06-12-2007 04:58 AM
cancel netflix questions? peter DVD Video 41 03-22-2006 09:49 PM
Blockbuster - how many days in advance to cancel membership? Michael DVD Video 4 11-10-2005 05:22 PM
Samsung V6500 Macromedia bypass Joe DVD Video 0 05-01-2004 11:21 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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