Why all my links opening in a new Window?(为什么我的所有链接都在新窗口中打开?)
问题描述
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.
这篇关于为什么我的所有链接都在新窗口中打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么我的所有链接都在新窗口中打开?
基础教程推荐
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
