PostBackURL to new window

  • Thread starter Thread starter bill
  • Start date Start date
B

bill

I am using Visual Web Developer 2005.

Can I use the button PostBackURL to open a second web form in a new window,
instead of replacing the current page?

Thanks
Bill
 
Hi,

one way is to change form's target when posting

<asp:Button ID="Button1" OnClientClick="form1.target='_blank'"
runat="server" Text="Button" PostBackUrl="~/Default2.aspx" />

You just might also turn it back after posting, in case other buttons still
continue posting on the same page.
 
I'm pleased to report that I figured it out for my self!
In case anybody else cares, put

<base target="_blank"></base>

between the <head></head> tags of the source aspx page.

PostBackURL is a good feature.

-Bill
 
Back
Top