Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 03, 2009 12:49 PM by KJAK
Apr 02, 2009 07:35 PM|LINK
I've searched around and tried several things such as:
However, this still opens the new page in the same browser window.
Using .NET, how can I force a new window to open?
Apr 02, 2009 07:48 PM|LINK
ClientScript.RegisterStartupScript(this.GetType, "popup", "window.open('YourURL','_blank','menubar=no')", true);
Apr 02, 2009 07:51 PM|LINK
On the other hand if you don't need to do a postback first you can simply use a hyperlink control and set the
Target property to _blank.
Response.Redirect is a method to let the browser know that it should navigate to an new provided url.
Apr 03, 2009 12:49 PM|LINK
So, I've decided on two possible ways that I will do this:
1) I will use an asp hyperlink and modify the code-behind to point to the document and open in a new window
2) If I want to use a button, I will create an ASP label. Inside that label I will place an HTML button that is wrapped with an HTML anchor tag that has a target="_blank". This will provide the end-user with the illusion that the button is doing the work
when in reality its a hyperlink.
Thanks for the replies!