esposito
Centurion
Hello I'm new to ASP.NET and I have problems managing a Javascript "confirm" message box .
Below you will find the public procedure that allows you to get a message box with two options (OK and Cancel) and the code I used to call such a procedure.
Of course the code above assumes that you have a button called btnMsgBox.
Now, what I can't do is detect whether the user clicked on OK or Cancel.
Any help?
TIA
Below you will find the public procedure that allows you to get a message box with two options (OK and Cancel) and the code I used to call such a procedure.
Code:
Public Sub ShowConfirmMessage(ByVal strMessage As String)
Dim strScript As String
strScript = "<script language=javascript> " & Environment.NewLine
strScript = strScript + "confirm('" & strMessage & "')"
strScript = strScript + "<"
strScript = strScript + "/"
strScript = strScript + "script>"
RegisterClientScriptBlock("clientScript", strScript)
End Sub
Sub btnMsgBox_Click(sender As Object, e As EventArgs)
ShowConfirmMessage("Please choose OK or Cancel.")
End Sub
Of course the code above assumes that you have a button called btnMsgBox.
Now, what I can't do is detect whether the user clicked on OK or Cancel.
Any help?
TIA