Starr Duskk
asked on
RememberMe cookie retrieval in MembershipProvider
In asp.net I am using the Login control with the checkbox for the RememberMe (provided by default).
I have created my own custom MembershipProvider.
When I step through the code, upon submission of the Log in control, it steps me through the ValidateUser function. I do not find anywhere in using my debug "watch" window where the RememberMe field is populated.
How do I retrieve the value of the "RememberMe" field so that I can know if a member has selected for me to remember them in a login cookie?
thanks.
I have created my own custom MembershipProvider.
When I step through the code, upon submission of the Log in control, it steps me through the ValidateUser function. I do not find anywhere in using my debug "watch" window where the RememberMe field is populated.
How do I retrieve the value of the "RememberMe" field so that I can know if a member has selected for me to remember them in a login cookie?
thanks.
ASKER
How do I convert that first line to VB? My loginID is:
<asp:Login ID="Login1" runat="server" OnLoggedIn="Login1_LoggedI N"
...
But when I set this up in my codebehind, the "Login1" is squiggly underlined...
Protected Sub Login1_LoggedIN(ByVal sender As Object, ByVal e As System.EventArgs)
Dim rememberme As CheckBox = Login1.FindControl("Rememb erMe")
My codebehind inherits:
Inherits System.Web.UI.Page
Is there anything else I need to get the "Login1" to not be squiggly underlined?
thanks!
<asp:Login ID="Login1" runat="server" OnLoggedIn="Login1_LoggedI
...
But when I set this up in my codebehind, the "Login1" is squiggly underlined...
Protected Sub Login1_LoggedIN(ByVal sender As Object, ByVal e As System.EventArgs)
Dim rememberme As CheckBox = Login1.FindControl("Rememb
My codebehind inherits:
Inherits System.Web.UI.Page
Is there anything else I need to get the "Login1" to not be squiggly underlined?
thanks!
ASKER
I think I have it figured out...
Dim rememberme As CheckBox = FindControl("RememberMe")
Dim rememberme As CheckBox = FindControl("RememberMe")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yay! Because what I had definitely wasn't working! :)
thanks!
thanks!
You need to set a cookie, and retrieve the value, this shows you how
http://www.codeproject.com/useritems/Remember_me_next_time.asp
RedK