open a new windows - server side code

Hello!

I am making a redirectLink string, eg:Page1.aspx?nr=1, on the Click event (server side code) of a button) and I want to open a new window with the URL = redirectLink and then redirect the first page with Response.Redirect("index.aspx");

I thought this would work but it dosen`t:

string scriptString = "<script language='JavaScript'>";

scriptString += "window.open('" + redirectLink +"','mywindow','menubar=1,resizable=1,width=1024,height=768');";

scriptString += "</script>";

if(!this.IsStartupScriptRegistered("redirectScript"))

Page.RegisterStartupScript("redirectScript", scriptString);

Response.Redirect("CloseBL.aspx");

If I removeResponse.Redirect("CloseBL.aspx");, works but without redirecting the first page.

Can someone heml me with this?

Thanks

[1308 byte] By [Eusebiu] at [2007-12-24]
# 1

you would be better posting at the ASP.NET forums since the forums is dedicated for ASP.NET you would get a better response:

http://forums.asp.net

this subforum is for ASP.NET WebServices and Xml - not quite the same thing :-)

ahmedilyas at 2007-8-31 > top of Msdn Tech,.NET Development,ASMX Web Services and XML Serialization...

.NET Development

Site Classified