Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/469.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ASP.NET webapp中的Javascript消息框_Javascript_Asp.net_Vb.net_Messagebox - Fatal编程技术网

ASP.NET webapp中的Javascript消息框

ASP.NET webapp中的Javascript消息框,javascript,asp.net,vb.net,messagebox,Javascript,Asp.net,Vb.net,Messagebox,我正在使用下面的代码处理我正在构建的webapp中的一些异常: 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

我正在使用下面的代码处理我正在构建的webapp中的一些异常:

            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)
Dim msg作为字符串
Dim SF_msg As String=“请在SF参数部分输入下限”
msg=“”
msg+=“警报('”&SF_msg&“);”
味精+=“”
HttpContext.Current.Response.Write(msg)
代码的输出是一个messagebox,它显然临时隐藏页面以显示消息

然而,我想要的是一个javascript消息框,它保持在页面上而不隐藏它。类似于大多数Web应用程序中的“确认导航”消息:

请告知。提前感谢。

改用这个:(需要转换为VB)


这是一个经典的asp吗?这是.NET Framework 3.5,请检查下面的答案
 ScriptManager.RegisterStartupScript(this, this.GetType(), "confirm", 
        "confirm('Please input lower bounds in SF Parameter Section');", true);