Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a 2nd post button
Message
 
To
24/04/2008 03:28:24
General information
Forum:
ASP.NET
Category:
Web forms
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01312816
Message ID:
01312831
Views:
13
>In a form, I have a second button used to execute an operation. The first one is used for the save. Both are submitting the form. How can I detect which button was pressed?

Each button has it's own Click event - you can just hook up a handler to the second button's event, eg.
<asp:Button runat="server" id="btnSave" Text="Save" onclick="btnSave_Save"></asp:Button>
In the codebehind:
Protected Sub btnSave_Click(ByVal sender As object, ByVal e As EventArgs)
' Code to respond to click here
End Sub
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform