View Full Version : Pop Up In New Window
03-08-2007, 10:34 PM
Ive got the following as the code behind a button in asp.net:
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
what code should go after the link to enable it to pop up in a new window instead of popping up in the current window?
03-08-2007, 11:06 PM
Using reponse.redirect sends a 302 to the browser.
That means removing the redirect.
03-09-2007, 12:42 AM
So on my .aspx page I put my linkbutton
<asp:LinkButton ID="LinkButton1" runat="server">New Window</asp:LinkButton>
On my code behind page I put my code in the page load event.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Now when the client first loads the page they will be also loading the code for the new window. Try it it works!
03-15-2007, 05:35 PM
Personally i would advise against using popup windows.. i believe it goes against the disability discrimination act due to it breaking the browser history
Designer Websites (http://www.designer-websites.co.uk)
03-15-2007, 05:57 PM
pop-ups and new broswer window are two different animals in my opinon. Byside how many sites have those pop-ups? That is also why on most broswers you can disable pop-ups.
I see nothing wrong with opening up a new broswer window through a link or linkbutton.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.