Response.Redirect to a new window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

From c#, I'm trying to redirect to an url within a new window. How do I do that?

I've been using: Response.Redirect(url); however, that redirects to the new url within the same page

Thanks

Daniel
 
Daniel,
opening a new browser window needs to be done client-side with script.

You could actually write out the script from your C# ASP.NET code in the
following manner:

string url="http://msdn.microsoft.com";

Response.Write("<script>window.open('" +url+ "');</script>");

Hope this helps.

--Peter
 
Back
Top