RedirectFromLoginPage
From: Murphy (murphy_at_murphy.com)
Date: 04/11/04
- Next message: soni29: "Possible to get iis on Windows XP Home Edition?"
- Previous message: Ken Cox [Microsoft MVP]: "Re: Add control to a placeholder"
- Next in thread: Michael Giagnocavo [MVP]: "Re: RedirectFromLoginPage"
- Reply: Michael Giagnocavo [MVP]: "Re: RedirectFromLoginPage"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 12 Apr 2004 09:12:15 +1000
I am trying to code a workaround to avoid being redirected to default.aspx
if the ReturnURL parameter is blank when the RedirectFromLoginPage method is
called.
Depending upon the login status the login button performs either a login or
logout and the appropriate image is displayed, see below:
'*******************************************************
' Displays the applicable image
'*******************************************************
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Request.IsAuthenticated = true Then
imgSignInOut.ImageUrl="images/signout.gif"
End If
End Sub
Interestingly before I altered the code and simply used the code below after
the user completed a login everything worked perfectly:
FormsAuthentication.RedirectFromLoginPage(customerId,
RememberLogin.Checked)
If I check the value of ReturnUrl and do a manual redirect if blank using
the code below Request.IsAuthenticated remains false and as a result the
page load event above always displays the login image...
If Request.QueryString("ReturnUrl") ="" Then
Response.Redirect("./")
Else
FormsAuthentication.RedirectFromLoginPage(customerId,
RememberLogin.Checked)
End if
Any ideas ?
Thanks
Murphy
- Next message: soni29: "Possible to get iis on Windows XP Home Edition?"
- Previous message: Ken Cox [Microsoft MVP]: "Re: Add control to a placeholder"
- Next in thread: Michael Giagnocavo [MVP]: "Re: RedirectFromLoginPage"
- Reply: Michael Giagnocavo [MVP]: "Re: RedirectFromLoginPage"
- Messages sorted by: [ date ] [ thread ]