Redirect Client to new page


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Redirect Client to new page

  1. #1
    Brent Guest

    Redirect Client to new page


    Here's a good one...

    I have some ASP code and when the User Successfully logs in I need to redirect
    their browser to another ASP page.

    Any help?

    Thanks,
    Brent

  2. #2
    T. Bradley Dean Guest

    Re: Redirect Client to new page

    Use response.redirect, but make sure it's the first thing written to the
    page.

    For example

    <%
    'Code Here To Check Valid Login

    If login is valid then
    Response.Redirect "http:\\www.yahoo.com"
    Else
    %>
    <HTML>
    Hey Schmuck, That's The Wrong Password
    </HTML>

    <%

    End If

    %>


    I'm not sure the code syntax is correct. I installed DreamWeaver UltraDev
    and it was nice enough to assume I wanted to use it as the default ASP
    editor. *DUH* Now I have to manually set the .ASP association back to Visual
    Studio 6. That 30 demo of DreamWeaver UltraDev isn't off to a good start...

    Bradley Dean

    Brent <leister@ae.com> wrote in message news:39d4e7eb$1@news.devx.com...
    >
    > Here's a good one...
    >
    > I have some ASP code and when the User Successfully logs in I need to

    redirect
    > their browser to another ASP page.
    >
    > Any help?
    >
    > Thanks,
    > Brent




  3. #3
    Glenn Guest

    Re: Redirect Client to new page


    Or, if you need to "redirect" from client-side code, use
    window.navigate "http://www.yahoo.com" (works in IE at least).

    "T. Bradley Dean" <Bradley.Dean@InfoDish.com> wrote:
    >Use response.redirect, but make sure it's the first thing written to the
    >page.
    >
    >For example
    >
    ><%
    >'Code Here To Check Valid Login
    >
    >If login is valid then
    > Response.Redirect "http:\\www.yahoo.com"
    >Else
    >%>
    > <HTML>
    > Hey Schmuck, That's The Wrong Password
    > </HTML>
    >
    ><%
    >
    >End If
    >
    >%>
    >
    >
    >I'm not sure the code syntax is correct. I installed DreamWeaver UltraDev
    >and it was nice enough to assume I wanted to use it as the default ASP
    >editor. *DUH* Now I have to manually set the .ASP association back to Visual
    >Studio 6. That 30 demo of DreamWeaver UltraDev isn't off to a good start...
    >
    >Bradley Dean
    >
    >Brent <leister@ae.com> wrote in message news:39d4e7eb$1@news.devx.com...
    >>
    >> Here's a good one...
    >>
    >> I have some ASP code and when the User Successfully logs in I need to

    >redirect
    >> their browser to another ASP page.
    >>
    >> Any help?
    >>
    >> Thanks,
    >> Brent

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center