how to open new window in new tab with asp.net

3,012 views
Skip to first unread message

Adel Husain

unread,
Jul 9, 2008, 6:10:29 PM7/9/08
to DotNetDe...@googlegroups.com
Hi there,

in ASP.NET if you want to open new window, the following code can be used:

Response.Redirect("newwindow.aspx");

but this will close the original window.

What I want is to open the new window in a new tap without closing the original window? any idieas

Regards,

Jamie Fraser

unread,
Jul 11, 2008, 5:30:20 AM7/11/08
to DotNetDe...@googlegroups.com
Javascript.

scandan K

unread,
Jul 11, 2008, 9:12:13 AM7/11/08
to DotNetDe...@googlegroups.com
 Dim loadscript = "<script language='javascript'>"
        loadscript += "window.open('" & file & "','Report','menubar=1,status=1,scrollbars=1,resizable=1')"
        loadscript += "</script>"
        If (Not ClientScript.IsStartupScriptRegistered("clientScript")) Then
            ClientScript.RegisterStartupScript(Me.GetType, "showalert", loadscript)
        End If
 

2008/7/11 Jamie Fraser <jamie....@gmail.com>:



--
Scandan K.
Perumbavoor.

Glenn

unread,
Jul 11, 2008, 3:48:54 PM7/11/08
to DotNetDe...@googlegroups.com
That's redirecting, not opening a new window.
 
...Glenn

 

Cerebrus

unread,
Jul 12, 2008, 1:18:32 AM7/12/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I have not seen any Javascript that would force a link to open in
another tab (assuming that the user is using a browser that supports
tabbing). I think it is something that is configurable by the user and
not by the programmer. For instance, a user could choose to open all
links from another domain in separate windows, but links within the
same domain in the same window, but different tab.

On Jul 11, 2:30 pm, "Jamie Fraser" <jamie.fra...@gmail.com> wrote:
> Javascript.
>

khurram shairyar(Sheri)- BIT6

unread,
Jul 12, 2008, 5:45:42 AM7/12/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hey Adel,
Do u want to open a new window, from your web page or from your code
behind file?

"What I want is to open the new window in a new tap without closing
the
original window"..
you want open window in new tab, like firefox or IE 7.0 does,
Then what i know is,it is not possible.Its
the default behavior of every browser....

I think you should also look at "Tabe Container" control of Ajax in
asp.net

with regards
Sheri

Adel Husain

unread,
Jul 13, 2008, 5:59:24 AM7/13/08
to DotNetDe...@googlegroups.com
Thank you all for replying to my question.

I want to open a new web page (ASP.NET) when a link in the original web page clicked.

Regards,

Glenn

unread,
Jul 14, 2008, 2:07:57 PM7/14/08
to DotNetDe...@googlegroups.com
target=_blank
 
...Glenn

 

khurram shairyar(Sheri)- BIT6

unread,
Jul 14, 2008, 2:51:50 PM7/14/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
ya exactly use this "target=_blank" in <a href=""> </a> tag..

regards



On Jul 13, 2:59 pm, "Adel Husain" <husain.a...@gmail.com> wrote:
> Thank you all for replying to my question.
>
> I want to open a new web page (ASP.NET) when a link in the original web page
> clicked.
>
> Regards,
>
> On Sat, Jul 12, 2008 at 12:45 PM, khurram shairyar(Sheri)- BIT6 <
>
Reply all
Reply to author
Forward
0 new messages