Home All Groups Group Topic Archive Search About

PostBackURL to new window

Author
10 Feb 2006 2:28 PM
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

Author
10 Feb 2006 3:22 PM
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.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

Show quoteHide quote
"bill" <bel***@datamti.com> wrote in message
news:uwoON5kLGHA.3260@TK2MSFTNGP11.phx.gbl...
>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
>
Are all your drivers up to date? click for free checkup

Author
10 Feb 2006 3:34 PM
bill
Thanks Teemu, that is a good way to do it.
-Bill


Show quoteHide quote
"Teemu Keiski" <jot***@aspalliance.com> wrote in message
news:OdoHiXlLGHA.3492@TK2MSFTNGP09.phx.gbl...
> 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.
>
> --
> Teemu Keiski
> ASP.NET MVP, AspInsider
> Finland, EU
> http://blogs.aspadvice.com/joteke
>
> "bill" <bel***@datamti.com> wrote in message
> news:uwoON5kLGHA.3260@TK2MSFTNGP11.phx.gbl...
>>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
>>
>
>
Author
10 Feb 2006 3:33 PM
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



Show quoteHide quote
"bill" <bel***@datamti.com> wrote in message
news:uwoON5kLGHA.3260@TK2MSFTNGP11.phx.gbl...
>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
>

Bookmark and Share