Opening up a new window/page

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
Hi guys,

When i move between two pages i am using the Response.Redirect command, however in some cases i would like to be able to open up a new window. Any suggestions??

mike55
 
mike55 said:
Anyone got some code that will do it???
i cant speak for everyone coding style, but i add the js into the <body> tag

so i have on the aspx page
<body id="bTag" runat="server">

and in the code, i can add attributes to it:
bTag.Attributes.Add("onLoad","window.open('page2.aspx');")

that's how i'd do it
 
Thanks for the way of doing it, even if I didn't asked.
Wasn't informed that you could call a window open from the server(well... you know what I want to say... inserting javascript from the server to open a window).

Thanx
 
Arch4ngel, yes you can insert the JS from your server code but the execution must still be from a client side event for example OnClick of a control, OnLoad of the Body etc....
 
Back
Top