ASP Login control does not work inside a Sitecore 6 sublayout

In Sitecore 6, I have created a sublayout that has an asp:login control. For some reason, it doesn't work when I add it to the layout of a page. The page simply posts back, but doesn't log me in.

I made a stand alone .aspx with a login control and it works fine. So the problem is not with the membership system. My guess is it has something to do with the page life cycle and event ordering. Maybe the login control is not getting added to the page in time to handle the correct events and data?

Does anyone know why the login control would not work when added as a sublayout? Does anyone know a work around?

UPDATE I hooked up event handlers to the controls events, and for whatever reason, they never get called. The control's onload method does get called, but the LoggingIn and Authenticate events never fire. This could still be due to my wrapper control not being added to the page in time. However, I think that they have other controls that do similar things, so I'm still not sure what I'm doing differently/wrong...

13.10.2009 17:13:46

Try adding the login control definition to the typesThatShouldNotBeExpanded list in web.config:

26.08.2013 15:57:14