Want a better Menu adapter? Send me your menus!

As part of the rewrite of the ASP.Net Control Adapters (see the Google project at http://code.google.com/p/aspnetcontroladapters), I started working on a new Menu adapter. It’s got a long way to go — and you can help me get there!

The best way to engineer proper adapted menu markup is to visualize how the non-adapted Menu generates markup (and, in a sense, reverse-engineer it). With that, here’s what you can do to help.

Send me a copy of the markup and generated code for your non-adapted Menu controls!

In other words, here’s what I can use.

  • The exact markup of your Menu tag from your ASPX page.
  • Any codebehind that manipulates the properties of your Menu tag (i.e. changes to what you declared in your ASPX page).
  • Your sitemap file (if used), or any details that you can give about the site map used to generate your menu.
  • The HTML generated in the web page by all of the above — using default (non-CSS-adapted) markup.

The goal is to look at lots of different uses of menus to understand how the different pieces manipulate markup so I can make an adapter which does everything it needs to do without breaking anything in the process.

If you have stuff to contribute, post it as a ticket to the ASP.Net Control Adapters project (at http://code.google.com/p/aspnetcontroladapters/issues/entry?template=Review%20request).

Please do NOT send anything that contains confidential information. At the very least, I’d need your Menu tag markup and the generated HTML. The other stuff is icing on the cake.

Thanks in advance to anyone who helps out! Remember, the more information you can provide, the better the results will be.

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!

Announcing the ASP.Net Control Adapters, a new open source project

Over the past few weeks, I started doing some experimentation with a different approach to changing the rendering of default ASP.Net controls. For a few years, I (and many others) have used the CSSFriendly project for this. That project does some nice things, but has many shortcomings.

I hemmed and hawed about this a bit (see Rewriting the ASP.Net CSS Friendly Adapters – does anyone care?), but in the end some fundamental interest — and the underlying popularity of the CSSFriendly project (consistently in the top-20 downloads on CodePlex) made me decide to go ahead with it.

So, I am proud to announce a new open source project: the ASP.Net Control Adapters! Continue reading