Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

ASP Net - PostBackURL to new window

 
Thread Tools Search this Thread
Old 02-10-2006, 01:28 PM   #1
bill
 
Posts: n/a
Default PostBackURL to new window

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


  Reply With Quote
Old 02-10-2006, 02:22 PM   #2
Teemu Keiski
 
Posts: n/a
Default Re: PostBackURL to new window

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" <> wrote in message
news:...
>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
>



  Reply With Quote
Old 02-10-2006, 02:33 PM   #3
bill
 
Posts: n/a
Default Re: PostBackURL to new window

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



"bill" <> wrote in message
news:...
>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
>



  Reply With Quote
Old 02-10-2006, 02:34 PM   #4
bill
 
Posts: n/a
Default Re: PostBackURL to new window

Thanks Teemu, that is a good way to do it.
-Bill


"Teemu Keiski" <> wrote in message
news:...
> 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" <> wrote in message
> news:...
>>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
>>

>
>



  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
HyperKore Hyper Kolor Laser-Etched Window Contest at Velocity Reviews! Ian Front Page News 10 11-26-2009 02:12 PM
closing the child window and refreshing the parent window Ane007 The Lounge 1 05-05-2008 06:54 AM
explores closes original window laures General Help Related Topics 1 09-21-2007 09:47 AM
new window minimizes to taskbar -D- A+ Certification 0 03-03-2007 12:07 AM
Window xp and startup disk Raymond A+ Certification 2 10-22-2003 09:06 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47