0

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.

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Can Canbek
  • 334
  • 3
  • 16
  • You can't, thats browsers settings. – RedDevil79 Feb 22 '13 at 12:54
  • This is possible a duplicate from [here](http://stackoverflow.com/questions/4907843/open-url-in-new-tab-using-javascript) – Marcus Vinicius Feb 22 '13 at 12:57
  • Actually, I can. I can make this work with a href target = "_blank" even in chrome. The problem is I need to send a parameter, and yes it is a similar question to your link marcus but they don't have the answer I need. – Can Canbek Feb 22 '13 at 13:04
  • possible duplicate of [Programmatically open new pages on Tabs](http://stackoverflow.com/questions/427479/programmatically-open-new-pages-on-tabs) – Rune FS Feb 26 '13 at 11:42

0 Answers0