Reputation: 321
I am using the code below to handle some exceptions in the webapp I'm building:
Dim msg As String
Dim SF_msg As String = "Please input lower bounds in SF Parameter Section"
msg = "<script language = 'javascript'>"
msg += "alert('" & SF_msg & "');"
msg += "<" & "/script>"
HttpContext.Current.Response.Write(msg)
The output of the code is a messagebox that apparently temporarily hides the page in order to show the message.
What I would like however is a javascript message box that stays on the page without hiding it. Something like the "confirm navigation" message in most webapps:
Please advise. Thanks in advance.
Upvotes: 0
Views: 227
Reputation: 2592
use this one instead: (needs to be converted to VB)
ScriptManager.RegisterStartupScript(this, this.GetType(), "confirm", "confirm('Please input lower bounds in SF Parameter Section');", true);
Upvotes: 2