Print Page | Close Window

Redirecting Web Page in ASP.net

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=11354
Printed Date: 28 March 2026 at 10:59pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Redirecting Web Page in ASP.net
Posted By: Misty
Subject: Redirecting Web Page in ASP.net
Date Posted: 29 July 2004 at 11:00pm

I am having a problem redirecting a web page to another web page in ASP.net. I want a password page to redirect the web page to emails.aspx. It keeps on redirecting to default.aspx. How do I solve this problem?

Here's my code:

     If UserIsValid(strUserName, strPassword) Then
  
       'Response.Redirect("emails.aspx") - didn't work

                 FormsAuthentication.RedirectFromLoginPage("emails.aspx", False)

        Else

                 lblOutput.Text = "Invalid login"

        End If

 




Replies:
Posted By: Diep-Vriezer
Date Posted: 04 August 2004 at 5:56pm

What error do you get? Try HttpContext.Current.Response.Redirect("Emails.aspx"), and if that's not working, do you get an infinite redirect loop or something like that?



-------------
Gone..


Posted By: Misty
Date Posted: 05 August 2004 at 9:51pm
Thank you for the code! It worked.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net