>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)
End Sub