js问题,不能回到上一页
Public Sub rejectPostingByGoBack(ByVal aprState As String)
HttpContext.Current.Response.Write("<script language='javascript'>alert('Approve State:" + aprState + "\nNot Allowed To Post')</script" + ">")
HttpContext.Current.Response.Write("<script language='javascript'>history.go(-1);</script" + ">")
End Sub
第2个response.write不能工作
------解决方案--------------------关键是你连着用了连个HttpContext.Current.Response.Write啊
这是根本
------解决方案--------------------如果是asp.net 2.0的话,请使用下面的代码注册js:
string message ="弹出信息";
strign gopage ="test.aspx";
string strScript = "alert('" + message + "');window.window.location.href='" + gopage + "';";
ClientScript.RegisterStartupScript(this.GetType(), null, strScript, true);
------解决方案--------------------
------解决方案--------------------突然想起以前写过
Response.Write("<script>window.alert('密码修改成功!'); location.href='mainpage.aspx'</script>");