string a="4";
        string url = "view.aspx?b="+a;
        string js = "window.open('url')";
        this.ClientScript.RegisterClientScriptBlock(GetType(), "js", js, true); //this指页面对象
为什么不能打开这个页面?

解决方案 »

  1.   


    this.ClientScript.RegisterClientScriptBlock(GetType(), "window.open('"+"view.aspx?b="+a+"')", js, true); //this指页面对象
    ps:建议lz找本基础的书,看看什么叫字符串
      

  2.   

     string js = "window.open(url)";
      

  3.   

    没有看明白,不知道this.ClientScript.RegisterClientScriptBlock(GetType是什么
      

  4.   

    string a="4";
            string url = "view.aspx?b="+a;
            string js = "window.open(\'"+url+"\')";
            this.ClientScript.RegisterClientScriptBlock(GetType(), "js", js, true); //this指页面对象
      

  5.   

    string a="4";
    string url = "view.aspx?b="+a;
    string js = "window.open('"+url+"')";
    Page.ClientScript.RegisterStartupScript(this.GetType(), "winOpen", js, true);