C# 如何将页面重定向到父框架?
我正在尝试将页面重定向到父帧。通过使用以下代码C# 如何将页面重定向到父框架?,c#,javascript,internet-explorer,google-chrome,C#,Javascript,Internet Explorer,Google Chrome,我正在尝试将页面重定向到父帧。通过使用以下代码 ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "window.open('myPage.aspx','_Parent')", true); 但这段代码在谷歌chrome和IE中不起作用,但在Mozila中却能正常工作。 有人能告诉我如何使这段代码独立于浏览器吗 使用以下命令代替window.open: window.location=“[url]” 如果
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "window.open('myPage.aspx','_Parent')", true);
但这段代码在谷歌chrome和IE中不起作用,但在Mozila中却能正常工作。
有人能告诉我如何使这段代码独立于浏览器吗 使用以下命令代替window.open: window.location=“[url]” 如果希望父窗口显示指定的URL,请使用:
window.parent.location=“[url”] ScriptManager.RegisterStartupScript(this.Page,this.GetType(),“a”,“parent.window.location.assign('Test.aspx'),true) 你能告诉我怎么用这个吗?我希望这段代码是c#。我认为在第二个代码示例中有一个带有引号的打字错误。