|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
PostBackURL to new windowI 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. 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 > 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 >> > > 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 >
Other interesting topics
IE's view source not showing what is actually being displayed
Duplicate custom controls List files in a directory, modify name. How to Store web pages to local disk using httpwebrequest asp.net control to run in web page like just COM Wierd Warnings: mailSettings modification results in many web.config messages browser compat issue Why use disconnected datasets? 'Timeout period elapsed prior to obtaining a connection from the pool.' - Please help. Occurence of Char! |
|||||||||||||||||||||||