Opening a link in new tab

2019-08-16 21:50发布

问题:

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.