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
  • 27,717
  • 28
  • 128
  • 190
Anyname Donotcare
  • 11,113
  • 66
  • 219
  • 392

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
  • 56,214
  • 69
  • 228
  • 381
  • 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