ASP.NET Membership: Login Controls Source Code
-
08-07-2019 - |
Question
Is the source code for the common login controls available?
Those are the controls which are available under Login section in Toolbox:
- Login,
- LoginView,
- PasswordRecovery,
- LoginStatus,
- LoginName,
- CreateUserWizard,
- ChangePassword
Eventually could you point me to a good source of custom implementation of functionality that those controls provide, or some guidance on implementing this functionality without using the mentioned controls.
I am using Visual Studio 2005 (.net2)
I will be using SQLMembershipProvider as the MembershipProvider but that probably should make no difference.
Solution
I am going to give this a qualified "NO".
I have gone down the road of implementing an implementation of the Login server control using reflected source as a starting point (this was before symbol server integration).
Things seem to go swimmingly, with a few reflection hacks to get to core framework members that obviate reams of code.
Until you get to the designers. That infrastructure is a minefield and gets wide and deep with a quickness and is filled with even deeper buried internal types that need implementations or reflection hacks.
Ultimately wound up with a working control that I could extend but would never want to maintain.
The effort was not wasted; I learned a lot about how over engineered server controls are designed.
And then I just shifted a login control to template mode and got everything I needed to get done in a few lines of code. ;-)
Except as a learning experience I would certainly recommend against going down that road.
Good luck.
OTHER TIPS
"the entire framework is available" is not true. :)
The source code for the entire framework is available. The link below provides some details as to how to access: