程序用到了 MasterPage和ScriptManager和UpdatePanel现在 页面上有个后台按钮验证信息后,打开新的页面,但要保留原来的页面我用下面方法
Response.Write("<script language=javascript>window.open('Default.aspx','_blank'')</script>");弹出
Sys.WebForm.PageRequestManagerParserErrorException:The message received from the server could not be parsed, common causes for this error Details: Error Parsing ner ……我觉得 可能是页面上用到 ScriptManager和UpdatePanel的原因因为有模板页面所以不能用:<base target="_blank"/>
       请高手指教  还有什么更好的办法

解决方案 »

  1.   

    ScriptManager.RegisterClientScriptBlock()
    这个是专门和UpdatePanel一起用的javascript注册器。
      

  2.   

    有几个前提:
    (1)按钮是放在UpdatePanel里的吗?
      如果是放在里面的,然后看这个UpdatePanel刷新机制,如果这些都确定,需要在页面初始化的时候     ScriptManager.RegisterClientScriptBlock() 
    (2)按钮放在UpdatePanel外
       需要 页面初始的时候注册 btn.Attributes.Add("Onclick", "<script language=javascript> window.open('Default.aspx','_blank'') </script>");     
      

  3.   

    ScriptManager.RegisterStartupScript(UpdatePanelID,GetType(),"open","window.open('Default.aspx','_blank');",true);
      

  4.   

    在问一下 如果 有参数 要传给弹出的页面但是不想在地址栏里面显示参数就是不想用 
    "XXXX.aspx?id=XX&Name=XX"这种方法有没有更好的办法 谢谢!!!!!!!!!!!!
      

  5.   

    a.html要传的值
    <input type='text' id='txtID' name='txtName' value='' /> <br>
    <input type='button' value='open' onclick="window.open('b.html');" />
    b.html<script>
    function getValue()
    {
    //document.getElementById('txt').value=window.opener.txtName.value;
            document.getElementById('txt').value=window.opener.document.getElementById('txtID').value;
    }
    </script>
    <body onload='getValue();'>
    传过来的值是
    <input type='text' id='txt' />
    </body>