2012-09-12 119 views
0

在父页面我使用:重定向到链接的父窗口

function popitup(url) { 
      newwindow = window.open("child.aspx", 'name', 
      'height=700,width=800,scrollbars=yes,  
      resizable=no '); 
      if (window.focus) { newwindow.focus() } 
       return false; 
     } 

子窗口有一个链接:

protected void GridView_SelectedIndexChanged(object sender, EventArgs e) 
{ 
    Response.Redirect("Link1.aspx"); 
} 

我重新导向的子窗口。但我想在父窗口中打开“Link1.aspx”。

回答

1

你可以用一些javascript在子窗口中完成这项工作。查找window.opener属性。您可以使用重定向父这样:window.opener.location.href

1

你可以用这个JavaScript

window.parent.location = 'Link1.aspx' 
执行