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

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

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>”) 

 

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.