If you're using CSS Friendly Control Adapters to get some of your asp.net 2.0 controls under control - at least when it comes to the markup they render - be careful when adding comments to the CSSFriendlyAdapters.browser file.
The .browser file is an XML formatted file that the asp.net runtime uses to configure what adapter(s) gets attached to which framework control(s). And as some of you may be aware, there are some known issues with using the CSS Adapters with some of the new Login controls.
One common solution work around is to disable the CSS Adapters for the controls that are giving you problems. The easiest way to do that is to comment out the adapter's line in the CSSFriendlyAdapters.browser file. But you've got to be careful to comment out each line individually, rather than relying on a block comment.
The wrong way
<adapter controlType="System.Web.UI.WebControls.LoginStatus"
adapterType="CSSFriendly.LoginStatusAdapter" />
<!-- <adapter controlType="System.Web.UI.WebControls.CreateUserWizard"
adapterType="CSSFriendly.CreateUserWizardAdapter" /> -->
<adapter controlType="System.Web.UI.WebControls.PasswordRecovery"
adapterType="CSSFriendly.PasswordRecoveryAdapter" />
The correct way
<adapter controlType="System.Web.UI.WebControls.LoginStatus"
adapterType="CSSFriendly.LoginStatusAdapter" />
<!-- <adapter controlType="System.Web.UI.WebControls.CreateUserWizard" -->
<!-- adapterType="CSSFriendly.CreateUserWizardAdapter" /> -->
<adapter controlType="System.Web.UI.WebControls.PasswordRecovery"
adapterType="CSSFriendly.PasswordRecoveryAdapter" />
It seems that the framework doesn't respect the block comment, and when I tried using oneĀ (like in the wrong way example above) I ended up with both the CreateUserWizard and the PasswordRecovery adapters disabled.
Maybe it was just me, but itsĀ better to be on the safe side and save yourself from having to crack your keyboard over your head.
Related Posts