In my master page I have two buttons:
<asp:Button ID="btnPrev" runat="server" CssClass="btn btn-prev" Text="Prev" />
<asp:Button ID="btnNext" runat="server" CssClass="btn btn-next" Text="Next" />
The user clicks on the and of course the page fires, great, except I want to do an action based on which button is pressed. I can go back and reference the Master Page as the first thing on the Content Page
Call btnNext_clickassessment(sender, e)
and
Protected Sub btnNext_clickassessment(sender As Object, e As System.EventArgs)
Me.Master.btnNext_Click(sender, e)
End Sub
However this does not determine which button was actually pressed.
I have looked at onclick
and If CType(sender, Button).ID = "btnNext_Click" Then
but nothave not found a solution yet (or one of those is an I've set it wrong!
Maybe even some javascript?