How to Open a Redirect in a New Window
Posted by Tihomir Ivanov on 16 January 2010 19:17
Rating: 0.00
You may often use the Response's Redirect method to open new pages, ex:
Response.Redirect("http://www.devtheweb.net");
It will open the url in the same window.
If you want to open url by server side in a new window, it cannot be done using the Response's Redirect method.
But it can be done using JavaScript, here is an example:
ClientScript.RegisterStartupScript(typeof(Page), "key", "<script>window.open('http://www.devtheweb.net','_blank')</script>");
Comments:
No comments yet.