.NETGURU
Cancelling out of a form with validators.
Messages   Related Types
This message was discovered on ASPFriends.com 'aspng-validators' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Duncan C. Ion
-- Moved from [aspngibuyspy] to [aspng-validators] by Let the good times roll <Click here to reveal e-mail address> --

Hi,
I have a webform that has several textboxes with associated 'Required field'
validators. If I add a 'CANCEL' button to the form, to allow the user to
cancel out of the form entry, I find that the event model never actually
gets to the cancel_click event as the validators kick in first. So how do I
cancel out of the form?

Thanks in advance.
Duncan

Reply to this message...
 
    
Brian Bilbro (VIP)
Here's an example:

<asp:LinkButton
    id=3D"cancelButton"
    Text=3D"Cancel"
    CausesValidation=3D"False"
    runat=3D"server"
    class=3D"CommandButton"
    BorderStyle=3D"none" />

The CauseValidation attribute will keep the page from being validated.

HTHs,
Brian

----- Original Message -----
From: "Duncan C. Ion" <Click here to reveal e-mail address>
To: Click here to reveal e-mail address
Sent: Tue, 30 Jul 2002 01:43:01 +0100
Subject: Cancelling out of a form with validators.
[Original message clipped]

Reply to this message...
 
 
System.Web.UI.WebControls.BorderStyle
System.Web.UI.WebControls.LinkButton
System.Windows.Forms.BorderStyle




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification