473,385 Members | 1,400 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,385 software developers and data experts.

How to cancel out a form with validators

Hi all,

I have several Textbox controls, RequireFieldValidator controls, a submit
button and a cancel button in my page. When the user press the cancel
button, they should be able to exit this page without showing required field
messages. I set the "causesvalidation" property of the cancel button to
False, but it still shows the message. How should I make the cancel button
work? Why the "causesvalidation" property doesn't work?

Thanks,

Needy
Nov 19 '05 #1
2 1125

Set CausesValidation for the button to false in the properties window
or in the Init event

button1.Causesvalidation = False

Nov 19 '05 #2
Yes, I did set "Causesvalidation = False". Here is my code:
<asp:linkbutton id=btnCancel runat="server"
causesvalidation="False">Cancel</asp:linkbutton>
But it still doesn't work.
"BillGatesFan" <kl******@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...

Set CausesValidation for the button to false in the properties window
or in the Init event

button1.Causesvalidation = False

Nov 19 '05 #3

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

Similar topics

3
by: news.public.microsoft.com | last post by:
Hi everyone, I have a VB.NET web form with some field validators and Save and Cancel buttons. What I want to do is on the Cancel button On_Click event, Response.Redirect to another page. The...
1
by: iMedia User | last post by:
I have a site where I want to use the Web form validators in two separate forms on a single page. One form allows existing users to log in while the second one allows new users to register. The...
3
by: MB | last post by:
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...
3
by: RSB | last post by:
Hi every one , i am creating this form and i have two asp:Linkbuttons one for save and one for Cancel. Now i also have some RequiredFieldValidators on this Form and i only want to Execute...
1
by: darrel | last post by:
I have a form that has validators for each field. When I submit the form, if the field is invalid, it shows an error next to the field. Works perfectly. I also have a label at the top of the form...
4
by: Joe Abou Jaoude | last post by:
hi I m facing the following problem often : In a web page the user can click on 2 buttons "button1" and "button2". If the user clicked on button1 then I have to validate part of the form (some...
2
by: Chris | last post by:
Hi, I have a web form with a bunch of textboxes, drop down lists, etc. The form also has 5 command server side buttons. When ever a user clicks on a button it fires off the form validators. ...
0
by: Stuart Whiteford | last post by:
Hi, I've got a basic web form, two textboxes, a couple of radio button groups, some required field validators, and a Submit and Cancel button. When the page loads, if I click the Cancel...
0
by: Suresh.Eddala | last post by:
Hi, I am trying to do Form validation on client side by using atlas client-centric script. Grouping all the field validation by using "validationGroup" and on button click event checking the...
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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.