我只是想在原来的页面上放上一个button
点击此button在原来的界面上跳出来一个asp界面,但是不是将原来的界面覆盖掉  
我现在是这样写的   但是一直报错  请大神帮我看一看代码如下
  <asp:Button ID="Button1" runat="server" Text="新增采购" Width="69px" OnClick="window.open('ITconPurchase.aspx','','width=500,height=300')"  />

解决方案 »

  1.   

    改为showmodaldialog.方法在button后台写.
      

  2.   

    哥们  能具体点吗  我是接触asp没多久啊   
    谢谢啦 
      

  3.   

    OnClientClick="window.open('xxx.aspx','_blank')" 
    OnClientClick=" OpenWindow();return false;"
    function OpenWindow()
    {}
      

  4.   

    controlWindow=window.open(loadpos,winname,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=100,height=200,screenX=5,screenY=5");
     
       controlWindow.focus();
        windowResize(controlWindow,width,height);
        return "cancel";
      

  5.   


    把页面上的onclick事件去掉,这个是后台操作的事件,不是写脚本的地方
     <asp:Button ID="Button1" runat="server" Text="新增采购" Width="69px" OnClick="window.open('ITconPurchase.aspx','','width=500,height=300')" />
    改为
     <asp:Button ID="Button1" runat="server" Text="新增采购" Width="69px"  />后台
    protected void page_load()
    {
       if(!ispostback)
    {
    button1.attribute.add("onclick","javascript:window.open('ITconPurchase.aspx','','width=500,height=300')");
    }
    }
      

  6.   

    change onclick to onclientclickonclientclick="openWindow();"jsfunction openWindow()
    {
    window.open('xxx.aspx');
    return false;
    }