473,473 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Two buttons on same page

I have a Submit button for a page which uses validation controls, and
now I want to add a Logout button to a user control at the top of the
page. But whenever I press the Logout button, the validation associated
with the Submit button occurs. How can I prevent this from happening?

*** Sent via Developersdex http://www.developersdex.com ***
Jul 19 '07 #1
2 1257
Mike,

just set CausesValidation property to false on your Logout button

"Mike P" wrote:
I have a Submit button for a page which uses validation controls, and
now I want to add a Logout button to a user control at the top of the
page. But whenever I press the Logout button, the validation associated
with the Submit button occurs. How can I prevent this from happening?

*** Sent via Developersdex http://www.developersdex.com ***
Jul 19 '07 #2
You could set the CausesValidation property of the Submit button to False.
Another option in ASP.NET 2.0 is validation groups.
Here's more info:
http://SteveOrr.net/articles/Validation.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"Mike P" <mi*******@gmail.comwrote in message
news:eo**************@TK2MSFTNGP03.phx.gbl...
>I have a Submit button for a page which uses validation controls, and
now I want to add a Logout button to a user control at the top of the
page. But whenever I press the Logout button, the validation associated
with the Submit button occurs. How can I prevent this from happening?

*** Sent via Developersdex http://www.developersdex.com ***
Jul 19 '07 #3

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

Similar topics

8
by: Ralph Freshour | last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP? Thanks...
1
by: Luis | last post by:
I have a few input buttons at the end of an asp page. When I change the mime-type of the asp page to create a Word Document which the user can save, the input buttons are not displayed. Is there a...
1
by: KS | last post by:
I write my html pages as .jsp files (java server pages). The final result when the page is rendered in the browser, and I do a view source, is nothing less the normal HTML codes. The problem is I...
4
by: Penny | last post by:
Hi all, I have a checkout page in my online shopping cart that needs two submit buttons that direct to two seperate pages. Whichever button the user clicks, the destination page will use much...
5
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main...
6
by: Totto | last post by:
Hi, Anyone know the best solution to dynamically add buttons to a asp 2.0 page using data from Sql server? Are there any contols suitable for this or is it best to iterate the dataset and...
4
by: Blasting Cap | last post by:
I have a page that has a number of radio buttons that will be displayed to different access levels of a user who logs in to my website. For instance, if there are a dozen buttons, user1 will see...
9
by: mosscliffe | last post by:
I am struggling to find a python example of the scenario - I have. I have a python script, which generates a page with a search button (actually an input field). The data from the above...
11
by: Twayne | last post by:
Hi, Newbie to PHP here, no C or other relevant background, so pretty niave w/r to the nuances etc. but I think this is pretty basic. XP Pro, SP2+, PHP 4.4.7, XAMPP Local Apache Server...
7
by: gengyue | last post by:
Hi, I am running a report using Cold Fusion. This report is generated by cfloop tag. Depends on the record count of a query, the report will list the data retrieved from the database. each row in...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.