Response.Redirect to a new window

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
 
P

Peter Bromberg [C# MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top