);
page.RegisterStartupScript("message", "<script language='javascript' defer>alert('" + msg.ToString() + "');</script>");
/// 显示消息提示对话框,并进行页面跳转
/// </summary>
/// <param name="page">当前页面指针,一般为this</param>
/// <param name="msg">提示信息</param>
/// <param name="url">跳转的目标URL</param>
public static void ShowAndRedirect(System.Web.UI.Page page, string msg, string url)
{
StringBuilder Builder = new StringBuilder();
Builder.Append("<script language='javascript' defer>");
Builder.AppendFormat("alert('{0}');", msg);
Builder.AppendFormat("top.location.href='{0}'", url);
Builder.Append("</script>");
page.RegisterStartupScript("message", Builder.ToString());
}
RegisterStartupScript("","<script>if(confirm('注册成功,请登陆!')){window.open('index.aspx','_self');}</script>");
RegisterClientScriptBlock("","<script>alert('所要弹出的提示信息');</script>");