PostBackURL to new window

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
 
T

Teemu Keiski

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.
 
B

bill

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

PostBackURL 4
How to use postbackUrl in new window 1
PostBackURL 1
PostBackUrl 1
PostbackUrl 3
Postbackurl and Context.Items 0
ListBox and PostBackUrl event 3
Context.Items and Postbackurl in ASP.NET 2.0 0

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top