zoukankan      html  css  js  c++  java
  • Page.ClientScript.RegisterClientScriptBlock 失效

    1.方法一:

    Page.ClientScript.RegisterClientScriptBlock(GetType(), "aaa", "<script>alert('增加数据成功!');document.location='A06_list.aspx'</script>");

    2.方法二:

    string url = Request.Url.ToString();     // 当前页面请求的地址
                        url = url.Substring(0,url.LastIndexOf('/')+1);
                        url += "A06_list.aspx";  //要跳转的页面
                        Response.Write("<script>alert('增加成功');location='"+url+"'</script>");

    3.对于回传问题

    a.重新调用一下if (!IsPostBack){}里的方法

    b.Page.ClientScript.RegisterClientScriptBlock(GetType(), "alert1", "<script>alert('"+message+"');document.location='A06_list.aspx'</script>");

  • 相关阅读:
    严格模式
    排序,求最大值最小值
    原型继承
    android 系统
    BASE64Decoder
    jstl
    list  遍历
    2015GitWebRTC编译实录9
    2015GitWebRTC编译实录8
    2015GitWebRTC编译实录7
  • 原文地址:https://www.cnblogs.com/ljan/p/2438889.html
Copyright © 2011-2022 走看看