0

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.

enter image description here

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:

enter image description here

Please advise. Thanks in advance.

lulutanseco
  • 313
  • 1
  • 8
  • 29

1 Answers1

2

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);
Ali
  • 2,574
  • 1
  • 17
  • 24