|
-
Apr 1st, 2009, 10:35 AM
#1
Thread Starter
Lively Member
Using Response.Redirect("Login.aspx")
Hi All,
On my home page i send the user to the login screen if they are not already logged in! Using:
Response.Redirect("Login.aspx")
But i dont want to do this if they are already on the Login.aspx. Is there a funtion which will show me the current page the post back came from?
so i can say
if ?????? <> "Login.aspx" then
Response.Redirect("Login.aspx")
end if
-
Apr 1st, 2009, 10:46 AM
#2
Frenzied Member
Re: Using Response.Redirect("Login.aspx")
what does your login logic look like?
-
Apr 1st, 2009, 10:56 AM
#3
Re: Using Response.Redirect("Login.aspx")
Hey,
You should be able to use the following:
User.Identity.IsAuthenticated
However, depending on what it is you are trying to do, you may be able to use the LoginView Class, or maybe the built-in authentication redirects that come with the Membership Provider in ASP.Net.
What exactly are you trying to achieve?
Gary
-
Apr 1st, 2009, 05:05 PM
#4
Re: Using Response.Redirect("Login.aspx")
If this is in some sort of a master page event, then look at Request.Url and parse it to determine the current pagename.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|