Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

RememberMe cookie retrieval in MembershipProvider

Posted on 2007-11-20
5
Medium Priority
?
359 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
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

916 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