How do I open a URL in a new Browser Window in ASP.NET?

This quick tip shows you how to open a URL in a new Browser Window in ASP.NET.
  • 16264

In ASP.NET, we usually use Response.Redirect or Server.Transfer to go to a new URL. What if we have to open this new URL in a new browser window?

The following code snippet opens a URL in a new browser window. For example, if you want to open a URL in a new browser window on a button click, just copy the following code and replace URL with your URL.

Response.Write("<script type='text/javascript'>detailedresults=window.open('YOURPAGE.aspx');</script>")

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.