Opening a link in new tab

我与影子孤独终老i 提交于 2019-12-12 03:46:06

问题


I am using an imagebutton to send the ID of a project as a command argument. In a window, I only display one picture and that's the imagebutton. When that image is clicked I want to open the related project's all pictures in a new tab.

With this code on code behind,

int ID = Convert.ToInt32(e.CommandArgument);
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", string.Format("yenipencere = window.open('Projeresim.aspx?ProjeID={0}','_blank')", ID), true);

I can manage this beautifully in Firefox and Internet Explorer, but Chrome insists on opening it as a pop-up. Is there any way I can make this happen in Chrome as well or is it a default Chrome setting?

I know I could use other linking methods, but I need to send an ID as a parameter.

来源:https://stackoverflow.com/questions/15024390/opening-a-link-in-new-tab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!