CSS Adapters issues with Login controls
If you are using ASP.NET 2.0 CSS Friendly Control Adapters 1.0 with the Login controls of ASP.NET 2.0 you might have experienced some issue like multiple postback when using Internet Explorer. You might get a GREAT fix and explanation of the issue from Tana Isaac of Wellington, New Zealand.
Buttons that reside within the controls that are adapted by the CSS Control Adapters, for example the CreateUserWizard.CreateUserButton, are rendered out differently depending on the button type (which is set for example via CreateUserWizard.CreateUserButtonType = ButtonType.Link). The default button type used by the membership controls is Button. The following html controls are rendered out for the different System.Web.UI.WebControls.ButtonType enum values:
ButtonType.Button: input, type=submit
ButtonType.Image: input, type=image
WebForm_DoPostBackWithOptions(WebForm_PostBackOptions(eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit))
In order to stop ‘Button’ buttons and ‘Image’ buttons firing twice we just need to set the clientSubmit parameter to false when these types of buttons are rendered out.
Other problems (specific to the CreateUserWizardAdapter control)
Once the double postback problem was fixed two other problems popped up. The first was that users still weren’t being created. This was because the id and name (which is derived from the id) being used for the create user button was missing an underscore.
The other problem was that the cancel button didn’t work. It was also missing an underscore from its name and also wasn’t registered for Event Validation.
Great work Tana, Thanks for sharing you saved me some time.
Update: The CSS Adapters project is now hosted on Codeplex, http://www.codeplex.com/cssfriendly.