想要实现点击一个按钮弹出一个新页面,原页面不刷新,原页面上有dropdownlist 和文本框等东西,求点按钮后 DropDownList 选择的项不变,文本框内容也不能清空   目前是这样弹出页面的
   
   Response.Write("<script>window.open('xxx.aspx?sr=" + sr + "','_blank')</script>");

解决方案 »

  1.   

    btn.Attribute.Add("onclick","return PopPage('"+sr+"');");funtion PopPage(sr)
    {
       window.open('xxx.aspx?sr=sr','_blank');
       return false;
    }
      

  2.   

    那个按钮 跳转要执行事件吗  不要执行的话   
    就不要用cs些代码 了  直接
    <input type="button" value="返回" onclick="javascript:history.back()" />
    改下onclick事件
      

  3.   

    js写错了funtion PopPage(sr)
    {
      window.open("xxx.aspx?sr="+sr+","_blank");
      return false;
    }
      

  4.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head><body>
    <form action="http://news.sina.com.cn" method="get" name="form1" target="_blank" id="form1">
      <label>
      <input type="submit" name="Submit" value="提交" />
      </label>
    </form>
    </body>
    </html>在action是动作...动作的内容就是打开http://news.sina.com.cn
    target="_blank" 是以新页面打开...你将上面的内容保存到aaa.html然后运行一下就知道了... -------------------------------------------以上内容是搜索出来的
      

  5.   

    funtion PopPage(sr)
    sr就是你页面要传的值
      

  6.   

    如有个DropDownList  ddl在Page_Load中就可以这样写,btn.Attribute.Add("onclick","return PopPage('"+ddl.SelectedValue+"');");