New CheckBoxList and RadioButtonList control adapters

I recently implemented a new control adapter for the CheckBoxList control, with lots of available functionality, as the first component in the (relatively new) ASP.Net Control Adapters open source project. It’s not complete, but it is definitiely functional.

Since the RadioButtonList control is very similar, I decided to implement it. After five minutes (mostly spent copy/pasting and renaming CheckBox to RadioButton), I had a RadioButtonList control adapter that had the same functionality as the existing CheckBoxList control adapter. Very cool!

Part of the testing process is to examine the HTML rendered by the default controls, comparing it to the adapted controls, to make sure whatever is implemented is done properly. In that process, I found one odd behavior related to the AccessKey property.

With the CheckBoxList control, the AccessKey property is applied to each input type=checkbox. With the RadioButtonList, the AccessKey property is applied to each input type=radio when the RepeatLayout is set to Flow. However, set the RepeatLayout to Table, and the AccessKey property is applied to the table that wraps around the controls. I doubt this is by design; if it was, the behavior would likely be the same in the CheckBoxList, which it isn’t.

Anyway, the CheckBoxList and RadioButtonList control adapters are there for your testing and review. Please check them out and let me know what you think!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.