为什么我所有的链接在新窗口中打开? [英] Why all my links opening in a new Window?

查看:138
本文介绍了为什么我所有的链接在新窗口中打开?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我升级的Web项目从框架2.0〜4.0

在我的主页上有几个环节。一旦点击他们将打开在同一窗口内。

有一个链接,其中包含一个水晶报表查看器的页面。有一次,我访问该网页,并返回到主界面,任何链接上点击后打开它在一个新的窗口!

我双重检查我的网址,没有什么与他们错了。

是什么原因造成这种现象?我如何prevent呢?

注意:该页面加载一个框架内

感谢

修改:这发生在IE浏览器仅

编辑2 :我也Krik在这篇文章试图建议<一href=\"http://stackoverflow.com/questions/7391080/asp-net-child-window-opens-up-on-a-new-window-on-every-post-back\">ASP.NET子窗口中打开一个新的窗口上的每次回来后并添加&LT;基地目标=_自我&GT; ,但它不工作。

编辑3 :这是我的链接是如何

 &LT;一类=MenuLinks目标=显示的href =../ REP / LdgrRep.aspx PAGEID = 34安培; MID = 1&安培; subModuelId = 3&GT ;党莱杰&LT; / A&GT;

其中,显示是我帧的名称。


解决方案

您提到你的框架的名称是的显示的。另外,还要确保到的标识的设置为显示的了。

这或许可以解释您的问题。有些浏览器与两个合作的名称的和的标识的,这和有些则没有。

Recently i upgraded a web project from Framework 2.0 to 4.0

On my main page there are several links. Upon clicking on them it opens within the same window.

There is one link to a page which contains a Crystal Report Viewer. Once i visit that page and return back to the main page, after that clicking on any link opens it in a new window !!

I double checked my urls, there is nothing wrong with them.

What is causing this behaviour ? and how do i prevent this ?

NOTE : The pages load inside a frame

thanks

EDIT : This happens in IE only

EDIT 2 : I also tried suggestion by Krik in this post ASP.NET child window opens up on a new window on every post back and added <base target="_self"> but it is not working.

EDIT 3 : This how my links are

<a class="MenuLinks" target="display" href="../REP/LdgrRep.aspx?pageId=34&mId=1&subModuelId=3">Party Ledger</a>

where display being the name of my frame.

解决方案

You mention the name of your frame is display. Also make sure to set the id to display too.

This may explain your issue. Some browsers work with both name and id for this and some don't.

这篇关于为什么我所有的链接在新窗口中打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆