Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

How do I prevent the validators firing when a button is clicked?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan Silver - 20 Jul 2005 12:50 GMT
Hello,

I have a page with some validators, all of which work fine. I want to
add a Cancel button to the page, so that if the user decides not to fill
in the form, they can click Cancel and go back to where they were
before.

Trouble is that clicking the Cancel button fires the validators and
stops the page being submitted. How can I get around this?

TIA

Signature

Alan Silver
(anything added below this line is nothing to do with me)

Hans Kesting - 20 Jul 2005 12:57 GMT
> Hello,
>
[quoted text clipped - 7 lines]
>
> TIA

The button has a CausesValidation property that is default "true" ...

Hans Kesting
Alan Silver - 20 Jul 2005 13:48 GMT
<snip>
>> Trouble is that clicking the Cancel button fires the validators and
>> stops the page being submitted. How can I get around this?
>
>The button has a CausesValidation property that is default "true" ...

Thanks for the fast and accurate response. I'm sure Ill get the hang of
all this one day ;-)

Signature

Alan Silver
(anything added below this line is nothing to do with me)

Jacek Stawicki - 20 Jul 2005 14:30 GMT
In ASP.Net 2.0. you have also ValidateGroup property which specifies group of
controls affected by validation.

Signature

C# Dev

> <snip>
> >> Trouble is that clicking the Cancel button fires the validators and
[quoted text clipped - 4 lines]
> Thanks for the fast and accurate response. I'm sure Ill get the hang of
> all this one day ;-)
Alan Silver - 20 Jul 2005 14:59 GMT
>In ASP.Net 2.0. you have also ValidateGroup property which specifies group of
>controls affected by validation.

Yeah, and I've wished that was in 1.1 a few times!! I hope they get 2.0
out of beta soon, there are so many new features I would like to use,
but I'm not putting a beta version on a production server!!

Thanks for the reply

Signature

Alan Silver
(anything added below this line is nothing to do with me)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.