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);
}
}

然后调用此方法

 posted on 2011-11-26 09:42  纳米程序员  阅读(409)  评论(0编辑  收藏  举报