RememberMe cookie retrieval in MembershipProvider

Posted on 2007-11-20
Last Modified: 2008-03-03
In 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?

Question by:Starr Duskk
  • 3
  • 2
LVL 22

Expert Comment

ID: 20324085

You need to set a cookie, and retrieve the value, this shows you how


Author Comment

by:Starr Duskk
ID: 20324165
How do I convert that first line to VB? My loginID is:

                <asp:Login ID="Login1" runat="server"         OnLoggedIn="Login1_LoggedIN"

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("RememberMe")

My codebehind inherits:
Inherits System.Web.UI.Page

Is there anything else I need to get the "Login1" to not be squiggly underlined?


Author Comment

by:Starr Duskk
ID: 20324320
I think I have it figured out...

Dim rememberme As CheckBox = FindControl("RememberMe")
LVL 22

Accepted Solution

RedKelvin earned 500 total points
ID: 20324482
very close
Dim rememberme As CheckBox = ctype(FindControl("RememberMe"), CheckBox)

Author Comment

by:Starr Duskk
ID: 20324550
yay! Because what I had definitely wasn't working! :)

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Execute Stored Procedure for a set of values 5 44
Re-position the objects 7 97
Adjust the position 3 49 show message while code is running 3 9
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on could not pull conte…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: (…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now