Home All Groups Group Topic Archive Search About
Author
20 Jan 2006 7:10 PM
dew
How can I do a response.Redirect and have it create a new window,
preferrably the _search as the target.  Thank you for your help.

Author
20 Jan 2006 7:29 PM
Mark Fitzpatrick
You can't target a response.redirect in anything but the current window. All
it can do is direct the current browser window to a url. You could instead
have it redirect to somewhere that would have a script that would open a new
window with the page you want, but response.redirect can't do this and
neither can server.transfer.

        Hope this helps,
        Mark Fitzpatrick
        Microsoft MVP - FrontPage

Show quote
"dew" <d**@yahoo.com> wrote in message
news:OqpMAUfHGHA.140@TK2MSFTNGP12.phx.gbl...
> How can I do a response.Redirect and have it create a new window,
> preferrably the _search as the target.  Thank you for your help.
>
Author
20 Jan 2006 7:30 PM
Peter Rilling
You cannot.  You have to emit the correct JavaScript so the browser will
open a new window and navigate.

Show quote
"dew" <d**@yahoo.com> wrote in message
news:OqpMAUfHGHA.140@TK2MSFTNGP12.phx.gbl...
> How can I do a response.Redirect and have it create a new window,
> preferrably the _search as the target.  Thank you for your help.
>
Author
20 Jan 2006 7:58 PM
dew
Thanks.  I have the javascript that works in a menu control, but how would I
do that in the code behind (vb)?  What I have is a button that gathers
search criteria (if any), then in page pre_render it calls the methods that
will search for data and return whether there is data, no data, or a certain
number of records.  That is where I need to launch the results in a search
window if there is a certain number of records.  How would I do that?

window.open('frmActiveRecords.aspx?idx=12345','_search')

Show quote
"Peter Rilling" <peter@nospam.rilling.net> wrote in message
news:%23aeBIgfHGHA.1032@TK2MSFTNGP12.phx.gbl...
> You cannot.  You have to emit the correct JavaScript so the browser will
> open a new window and navigate.
>
> "dew" <d**@yahoo.com> wrote in message
> news:OqpMAUfHGHA.140@TK2MSFTNGP12.phx.gbl...
>> How can I do a response.Redirect and have it create a new window,
>> preferrably the _search as the target.  Thank you for your help.
>>
>
>
Author
20 Jan 2006 8:07 PM
Peter Bromberg [C# MVP]
From your codebehind, you could actually do this using the Response object:
Response.Write("<script>window.open('frmActiveRecords.aspx?idx=12345','_search');</script>");

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




Show quote
"dew" wrote:

>
> Thanks.  I have the javascript that works in a menu control, but how would I
> do that in the code behind (vb)?  What I have is a button that gathers
> search criteria (if any), then in page pre_render it calls the methods that
> will search for data and return whether there is data, no data, or a certain
> number of records.  That is where I need to launch the results in a search
> window if there is a certain number of records.  How would I do that?
>
> window.open('frmActiveRecords.aspx?idx=12345','_search')
>
> "Peter Rilling" <peter@nospam.rilling.net> wrote in message
> news:%23aeBIgfHGHA.1032@TK2MSFTNGP12.phx.gbl...
> > You cannot.  You have to emit the correct JavaScript so the browser will
> > open a new window and navigate.
> >
> > "dew" <d**@yahoo.com> wrote in message
> > news:OqpMAUfHGHA.140@TK2MSFTNGP12.phx.gbl...
> >> How can I do a response.Redirect and have it create a new window,
> >> preferrably the _search as the target.  Thank you for your help.
> >>
> >
> >
>
>
>
>
Author
20 Jan 2006 8:34 PM
dew
Perfect!  Exactly what I needed, thank you so much, you are great!
Show quote
"Peter Bromberg [C# MVP]" <pbromberg@yahoo.nospammin.com> wrote in message
news:7E41A1AC-30E3-4A3B-BA76-30B69F705797@microsoft.com...
> From your codebehind, you could actually do this using the Response
> object:
>
> Response.Write("<script>window.open('frmActiveRecords.aspx?idx=12345','_search');</script>");
>
> Peter
>
> --
> Co-founder, Eggheadcafe.com developer portal:
> http://www.eggheadcafe.com
> UnBlog:
> http://petesbloggerama.blogspot.com
>
>
>
>
> "dew" wrote:
>
>>
>> Thanks.  I have the javascript that works in a menu control, but how
>> would I
>> do that in the code behind (vb)?  What I have is a button that gathers
>> search criteria (if any), then in page pre_render it calls the methods
>> that
>> will search for data and return whether there is data, no data, or a
>> certain
>> number of records.  That is where I need to launch the results in a
>> search
>> window if there is a certain number of records.  How would I do that?
>>
>> window.open('frmActiveRecords.aspx?idx=12345','_search')
>>
>> "Peter Rilling" <peter@nospam.rilling.net> wrote in message
>> news:%23aeBIgfHGHA.1032@TK2MSFTNGP12.phx.gbl...
>> > You cannot.  You have to emit the correct JavaScript so the browser
>> > will
>> > open a new window and navigate.
>> >
>> > "dew" <d**@yahoo.com> wrote in message
>> > news:OqpMAUfHGHA.140@TK2MSFTNGP12.phx.gbl...
>> >> How can I do a response.Redirect and have it create a new window,
>> >> preferrably the _search as the target.  Thank you for your help.
>> >>
>> >
>> >
>>
>>
>>
>>

AddThis Social Bookmark Button