New to Login Controls

Last post 10-09-2008 9:10 PM by anas. 2 replies.

Sort Posts:

  • New to Login Controls

    10-09-2008, 7:12 PM
    • Member
      27 point Member
    • Broodmdh
    • Member since 08-18-2005, 4:53 PM
    • Posts 87
    We're starting to move from using our own custom login controls to the ones that shipped with VS 2005, but I'm not sure how to adapt them to our purposes. We have stored procedures in place that I was hoping to use, but I don't know how to get the login control to use them, or the tables already set up in the database. Am I misunderstanding how the (not so) new membership controls are supposed to work? Can someone point me to a good tutorial that shows how to use them in this fashion? Thanks.

     

  • Re: New to Login Controls

    10-09-2008, 9:09 PM
    Answer
    • Contributor
      2,622 point Contributor
    • jpcoliveros
    • Member since 01-06-2006, 1:54 AM
    • Philippines
    • Posts 376
    • TrustedFriends-MVPs

    In your scenario, the most appropriate way to adapt your existing logic in your custom login controls is to implement membership providers that will match yours. In that way, it would lessen the work needed to hook login scenarios using the Login controls found in VS 2005.

    There are certain threads here in the forums that would give you a good headstart:

    http://forums.asp.net/t/1330875.aspx

    http://forums.asp.net/t/1303349.aspx

    http://forums.asp.net/t/1324539.aspx

    Personally, since you already have logic in place in your custom login controls, you can extend the SqlMembership class to handle that one and define it as a provider in your web.config. Suppose you have enclosed your own logic in a membership provider defined as "myCustomProvider" in the web.config file, you can extend the button click of the login control to do something like:

    Membership.Providers["myCustomProvider"].ValidateUser(Login1.UserName, Login1.Password)

    HTH

    Patrick Oliveros
    superpatrick.wordpress.com
  • Re: New to Login Controls

    10-09-2008, 9:10 PM
    Answer
    • All-Star
      60,901 point All-Star
    • anas
    • Member since 09-21-2006, 4:31 AM
    • Palestinian Territory, Occupied
    • Posts 6,865
    • Moderator

    Broodmdh:
    but I don't know how to get the login control to use them,

    By default , the login control and other controls  use Membership provider , but you let the login control work with  your custom database table ,

    Please take a look at this thread :

     http://forums.asp.net/t/1276534.aspx

     

    Regards,

    Anas Ghanem | Blog

Page 1 of 1 (3 items)