G
Guest
Help, I’m trying to implement a confirm button on an asp.net page. I have it
attached to a asp:button control. In the button1 click event I call the
CreateConfirmBox subroutine. The Box comes up with the yes/No option ok. My
problem or question is: How do I determine which button was pressed? Below
are the 2 routines I’m using.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
CreateConfirmBox(Button1, "Do you want to close?")
End Sub
Public Shared Sub CreateConfirmBox(ByRef btn As WebControls.Button, _
ByVal strMessage As String)
btn.Attributes.Add("onclick", "return confirm('" & strMessage & "');")
End Sub
Any help will be appreciated,
Logger
attached to a asp:button control. In the button1 click event I call the
CreateConfirmBox subroutine. The Box comes up with the yes/No option ok. My
problem or question is: How do I determine which button was pressed? Below
are the 2 routines I’m using.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
CreateConfirmBox(Button1, "Do you want to close?")
End Sub
Public Shared Sub CreateConfirmBox(ByRef btn As WebControls.Button, _
ByVal strMessage As String)
btn.Attributes.Add("onclick", "return confirm('" & strMessage & "');")
End Sub
Any help will be appreciated,
Logger