Results 1 to 6 of 6

Thread: Redirect

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    Question Redirect

    How do I redirect with ASP.Net?
    Code:
    if strResultsHolder = pass.text then
    		[Go to URL1]
    	else
    		[Go to URL2]
    end if

  2. #2
    Member
    Join Date
    Oct 2000
    Location
    Philadelphia
    Posts
    47
    Give this a whirl.

    VB Code:
    1. if strResultsHolder = pass.text then
    2.        Response.Write("<script language=Javascript>window.location.url='truePage.htm';</script>")
    3.     else
    4.               Response.Write("<script language=Javascript>window.location.url='falsePage.htm';</script>")
    5. end if
    U S A
    Visual Studio .NET
    Windows XP

  3. #3
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075
    Code:
    if strResultsHolder = pass.text then
    	Response.Redirect("MyAspPage.aspx")
    Else
                    Response.Redirect("MyOtherAspPage.aspx")
    		
    end if
    Last edited by EyeTalion; Dec 6th, 2002 at 08:41 AM.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    Talking

    I've found out

  5. #5
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Response.Redirect does it from the client side, if you want to do it from the Server side, then you can use Server.Transfer

  6. #6
    Addicted Member
    Join Date
    Oct 2002
    Posts
    128
    how do i "transfer" to a file within a different folder?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width