asp.net后台输出提示 ,背景不变白

protected void MsgBox(string message, string url)
{
ClientScriptManager cs = Page.ClientScript;

String csname1 = "PopupScript";
Type cstype = this.GetType();
if (!cs.IsStartupScriptRegistered(cstype, csname1))
{
String cstext1 = "alert('" + Server.HtmlEncode(message) + "');window.location='" + url + "';";
cs.RegisterStartupScript(cstype, csname1, cstext1, true);
}
}

然后调用此方法

你可能感兴趣的:(asp.net)