简体   繁体   中英

ASP.NET Membership: Login Controls Source Code

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.

"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:

http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM