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); } }
然后调用此方法
|
请发表评论