response.redirect

Discussion in 'ASP General' started by Hugh Welford, Aug 21, 2004.

  1. Hugh Welford

    Hugh Welford Guest

    Hi,

    is it possible to open a page in a new window with response.redirect, and if
    so, what is the syntax

    Thanks Hugh
     
    Hugh Welford, Aug 21, 2004
    #1
    1. Advertising

  2. Hugh Welford

    Evertjan. Guest

    Hugh Welford wrote on 21 aug 2004 in
    microsoft.public.inetserver.asp.general:

    > is it possible to open a page in a new window with response.redirect,
    > and if so, what is the syntax
    >


    No, a new window is a clientside thing.
    ASP does not know about windows.

    ASP does not push code, it is asked by the broweser for code.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 21, 2004
    #2
    1. Advertising

  3. Hugh Welford

    Hugh Welford Guest

    Thanks Evertjan - should have thought a bit more about it

    Regards Hugh


    "Evertjan." <> wrote in message
    news:Xns954D2B29380Deejj99@194.109.133.29...
    > Hugh Welford wrote on 21 aug 2004 in
    > microsoft.public.inetserver.asp.general:
    >
    > > is it possible to open a page in a new window with response.redirect,
    > > and if so, what is the syntax
    > >

    >
    > No, a new window is a clientside thing.
    > ASP does not know about windows.
    >
    > ASP does not push code, it is asked by the broweser for code.
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)
     
    Hugh Welford, Aug 22, 2004
    #3
  4. Hugh Welford wrote:
    > Hi,
    >
    > is it possible to open a page in a new window with response.redirect,
    > and if so, what is the syntax
    >
    > Thanks Hugh


    Only if the page being redirected to contains client-side code to open a
    page in a new window.

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Aug 22, 2004
    #4
  5. Hugh Welford

    Mar Chu Guest

    If you want to redirect with a button....
    just put below codes into page load event

    cmdPrint.Attributes.Add("OnClick",
    "javascript:window.open('yournewpage.aspx')")

    (cmdPrint is the name of a example button....)

    Greetingz

    Marchu
    Netherlands


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Mar Chu, Sep 21, 2004
    #5
  6. Hugh Welford

    Evertjan. Guest

    Mar Chu wrote on 21 sep 2004 in microsoft.public.inetserver.asp.general:
    > Bob Barrows [MVP] wrote on 22 aug 2004 in
    >> Hugh Welford wrote:
    >>> is it possible to open a page in a new window with
    >>> response.redirect, and if so, what is the syntax

    >>
    >> Only if the page being redirected to contains client-side code to
    >> open a page in a new window.

    > If you want to redirect with a button....
    > just put below codes into page load event
    >
    > cmdPrint.Attributes.Add("OnClick",
    > "javascript:window.open('yournewpage.aspx')")
    >
    > (cmdPrint is the name of a example button....)


    [quoting restored]

    Marchu, I fear you are talking ASP.net.

    This is a classic asp only NG. [jammer dan]

    ===============

    Hugh, you could try a pure clientside javascript solution
    [OT on this NG]:

    <button onclick="window.open('myOtherFile.asp')">
    Redirect me</button>

    ================

    or a serversided ASP one:

    <%
    if request.form("redirect")='Redirect me' then
    response.redirect "myOtherFile.asp"
    end if
    %>

    <form method=post target='_blank'>
    <input type=submit name=redirect value='Redirect me'>
    </form>

    =================

    not tested

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress,
    but let us keep the discussions in the newsgroup)
     
    Evertjan., Sep 21, 2004
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman
    Replies:
    2
    Views:
    8,072
    Charles A. Lackman
    Jan 11, 2006
  2. Matthew Wieder

    Response.Write and Response.Redirect

    Matthew Wieder, Jul 17, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    747
    Kevin Spencer
    Jul 17, 2003
  3. =?Utf-8?B?VHJveQ==?=

    Response.redirect does not redirect from .aspx page

    =?Utf-8?B?VHJveQ==?=, Oct 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,330
    Srowe1975
    Oct 15, 2008
  4. Sal
    Replies:
    1
    Views:
    914
  5. Ron Howard
    Replies:
    2
    Views:
    560
    Ron Howard
    Aug 11, 2004
Loading...

Share This Page