I have implemented a JavaScript function in my website to display a message box to the user:
Private Sub MessageBox(ByVal msg As String)
Dim lbl As New Label
lbl.Text = "<script language='javascript'>" & Environment.NewLine &
"window.alert('" + msg + "');" & Environment.NewLine &
"document.location = 'Clinica.aspx';</script>"
Page.Controls.Add(lbl)
End Sub
Now I am wondering if it is possible to add an "OK" and a "Cancel" button to the message box, similar to how it is done in VB.NET:
MsgBox(vbCritical _
& "Current appointment data has been modified!" & vbCrLf _
& "Changing the selected appointment will discard the changes" & vbCrLf _
& vbCrLf _
& "Do you want to continue?", _
vbOKCancel, _
"ATTENTION!")
As I am new to JavaScript, I would like to know if something like this is feasible. Thank you.