0

I open my page in a new tab through the following code :

String js = "window.open('" + page + "'" + ", '_blank');";

ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Open", js, true);

but in Google chrome it opens in a new window rather than in a new tab !

How to make it open in a new tab or even maximized ?

Liam
  • 25,247
  • 27
  • 110
  • 174
Anyname Donotcare
  • 10,649
  • 59
  • 212
  • 375

2 Answers2

3

You can't force the browser to open a tab instead of a window. That's up to the browser. I'm using Chrome 24.0.1312.57m, and all links, whether _blank or _new, open in tabs, not new windows.

Hubro
  • 52,462
  • 63
  • 210
  • 362
  • then how to make this window maximized initially – Anyname Donotcare Feb 27 '13 at 14:40
  • 1
    @just_name: You can't have it maximized, but you can choose a size. It can look maximized if you set it to the size of the screen. Take a look at this question: http://stackoverflow.com/q/2157180/388916 – Hubro Feb 27 '13 at 19:26
1

Javascript code cannot ensure that.It depends on the browser settings of the user whether a page will open in a new window or tab.

apoorvi
  • 251
  • 2
  • 5