473,378 Members | 1,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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
Nov 17 '05 #1
1 5453
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" <pb****@gnyjro.arg> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bart Lateur | last post by:
I'd like to have validation of the inputted text, in a form textbox. I want to give the user the option to try again, or to cancel out after which the textbox is either cleared or restored. I just...
5
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and...
5
by: Tina | last post by:
the Edit, Update, Cancel, and Delete buttons in my datagrid are causing validation elsewhere on the page. I want to specify that these buttons should not cause validation but they have no design...
5
by: Micky | last post by:
VB v7.1.3088 NET v1.1.4322 SP1 My mate has a strange problem regarding the ESC key and validation. When he hits the Cancel button on his form, the form does not validate. This is correct...
2
by: jsimons | last post by:
If the user accidentally clicks the X close button I'm using the following code in the form unload event to stop them from accidentally quitting Access. Private Sub Form_Unload(Cancel As...
5
by: Jon Paal | last post by:
how can I bypass the open/save/cancel dialog box and have the document requested open directly in the application associated with the file type ?
2
by: Thomas Guignard | last post by:
Hi there I need to run an XSLT stylesheet on XML files generated by another app that seem to have errors. When I try to run my XSLT processor (MSXML engine, run through the Cooktop editor), I...
1
by: Ganesh | last post by:
Hi There, I've a validation control in my page, In some cases i don't want to check the validation like when users click cancel, i'l take the page to home page. But it checks always validation....
1
by: cwby1966 | last post by:
I am Trying to validate information entered into 4 fields on a form. They can not be empty. If one of the fields is empty then the code should give a message athen stop. If all fields are valid then...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.