首页 > 其他 > 详细

对话框

时间:2015-11-25 22:13:39      阅读:274      评论:0      收藏:0      [点我收藏+]
  
  private void ShowMessageBox(string strMessaage)
    //输出信息
    {
        Page.ClientScript.RegisterStartupScript(this.GetType(), " ", string.Format("<script> alert(\"{0}\")</script> ", strMessaage.Replace("\"", "\\\" ")));
    }

    private void ShowMessageBoxURL(string err, string url)
    //输出信息并跳转
    {
        System.Text.StringBuilder builder = new System.Text.StringBuilder();

        builder.Append(" <script language=\"javascript\">");
        builder.Append("alert(\"" + err + "\");");
        if (!String.IsNullOrEmpty(url))
            builder.Append("location=‘" + url + "‘;");
        else
            builder.Append("history.go(-1);");
        builder.Append(" </script>");

        HttpContext.Current.Response.Write(builder.ToString());
        HttpContext.Current.Response.End();
    }

 

对话框

原文:http://www.cnblogs.com/cmfshcj/p/4995966.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!