用户点击修改 弹出一个页面
事件代码    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Page.ClientScript.RegisterStartupScript(this.GetType(), "showwindow", "assing(" + CompanyDetailsID + ")", true);
    }JS代码    function assing(CompanyDetailsID)
    { 
//alert(id);
    var str=window.showModalDialog("http://localhost:2773/321net/Update_Companyneirong.aspx?CompanyDetailsID=" + CompanyDetailsID,"",'resizable:no;scroll:no;edge: Raised; center: Yes; help: Yes; resizable: Yes; status: No;dialogHeight:500px;dialogWidth:650px');
    }
    </script>弹出修改窗口后,用户修改完点击保存,弹出对话框“保存成功” 点击对话框上面的确定后又弹出一个页面
所以这样的关闭方法不行  只关闭了点击对话框后弹出的页面 没有关闭修改的窗口Response.Write(" <script  language='javascript'>window.opener=null;window.close(); </script>");  
谢谢 大家 在线等 可能有点多 帮我看一下 谢谢了 
做出来后马上那个结贴

解决方案 »

  1.   

    你用的是showModalDialog对吧,你要在Update_Companyneirong.aspx页面的<head></head>里面加上这个
    <base target="_self" /> 这样就不会弹出新页面了搞定了吧,接分
      

  2.   

    <base target="_self" />  加在哪里啊?我在 <form id="form1" runat="server" target="_self"> 还是不行还是弹出行的窗口 
      

  3.   

    加到head里,我就是这么解决的没问题(asp.net 2.0)
    1.0的话用框架解决
      

  4.   

    <head> 
    <base target="_self" />
    </head>
      

  5.   


    <head> 
    <base target="_self" /> 
    <meta http-equiv="expires" content="0" />
    </head>弹出窗口最好去掉缓存, 在url接接下页加一随机数, 去缓存效果更佳.