Click to See Complete Forum and Search --> : how to open a html page in a new browser window by clicking button Web control


adamshao
December 16th, 2002, 04:42 PM
I'm trying to open an html page in a new browser window by clicking button Web control. I know Response.Redirect can only direct you to another page in the current browser window. How can I open it in a new browser window? Thanks.

gorgeous
December 26th, 2002, 02:32 AM
From the server you cannot open another window, you can do it at the client end. If your web server control(Button1) is on Page1.aspx page, and you want to open Page2.html, write down the follwing code on Buttin1_Click event.


My code is not appearing in the preview, so I've attached the code as a text file


When Page1.aspx is rendered back to the browser window.open will be executed to open the html page.


All the best

Gorgeous

peterjuv
January 29th, 2003, 04:12 PM
Where is the attached file? P


Originally posted by gorgeous
From the server you cannot open another window, you can do it at the client end. If your web server control(Button1) is on Page1.aspx page, and you want to open Page2.html, write down the follwing code on Buttin1_Click event.


My code is not appearing in the preview, so I've attached the code as a text file


When Page1.aspx is rendered back to the browser window.open will be executed to open the html page.


All the best

Gorgeous