Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

RememberMe cookie retrieval in MembershipProvider

Posted on 2007-11-20
5
Medium Priority
?
356 Views
Last Modified: 2008-03-03
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.
0
Comment
Question by:Starr Duskk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:RedKelvin
ID: 20324085
Hi,

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
0
 
LVL 2

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?

thanks!
0
 
LVL 2

Author Comment

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

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

Accepted Solution

by:
RedKelvin earned 2000 total points
ID: 20324482
very close
Dim rememberme As CheckBox = ctype(FindControl("RememberMe"), CheckBox)
0
 
LVL 2

Author Comment

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

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

670 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