CSS Control Adapters Update (Beta3)

I've blogged in the past about the great CSS Control Adapters that Russ and Heidi have been working on.  These adapters use a new built-in extensibility mechanism in ASP.NET 2.0 called "control adapters" that allow you to plug-in into any ASP.NET server control and override, modify and/or tweak the rendering output logic of that control.

The control adapters that Russ and Heidi built provide a pure CSS based rendering (no tables) for all of the ASP.NET Data (GridView, DataList, DetailsView, FormView, etc), Navigation (Menu, TreeView), and Login (Login, CreateUserWizard, ChangePassword,  PasswordRecovery, LoginStatus) controls. 

You can learn more about them and how to use them with your projects from my past tutorial blog post here.

Beta3 CSS Control Adapters Release

Earlier this week we published the "Beta3" version of the CSS Control Adapters which incorporates more feedback and suggestions, along with a number of new features.  Here are some shortcuts to a few cool new highlights:

  • Go to the Menu sample. Increase your browser's font size. In Internet Explorer use View > Text Size > Larger.
  • Go to the CreateUserWizard sample. Navigate with accesskeys. If using Windows, press Alt + e to set the focus to the textbox for the Email address. (In Internet Explorer you must also hold down the Shift key to use the accesskey for the password textbox.)
  • Try out the redesigned TreeView sample. Expand several nodes in the tree. Select a node to cause the page to post back. Notice that the tree maintains its expansion, visibly marks the selected node and uses its value to change the page's sample content.
  • Play with cascading checkboxes.
  • Validate that these pages conform to the XHTML 1.1 Strict standard.

You can learn more and download the free CSS Control Adapters (including both VB and C# versions of the source) from this web-site: http://www.asp.net/cssadapters

Hope this helps,

Scott

6 Comments

  • Will try this new update.
    Great job

  • Hi Scott

    These are a big improvement over the standard controls (I'd like to see these as the default when ASP.net "3.0" is released), but there's still one problem that jumps out straight away.

    I tried the TreeView and cascading checkboxes examples, and in both cases without JavaScript you can't get to the lower options, even though they're rendered in the XHTML.

    A better solution would be to tweak the code so that, instead of hiding everything on load and relying on JavaScript to display it, you display everything on load and use JavaScript to hide it straight away. Then, without JavaScript, the user sees all the options at once and the control remains accessible.

  • Russ and Heidi are doing a great job with the adapters.
    But are there only two persons working on this? If yes, then why? That the webcontrols generates good html is a very important feature for asp.net, something they should had been doing by default in v2. And ten persons can achive more then two. Right?

  • Mr Pedantic says: XHTML 1.1 doesn't have the word "Strict" because it has no non-Strict mode ;)
    Good stuff though. You guys are definitely learning to become more standards-based in the last couple of years.
    Just waiting for an ASP.NET AJAX release that works with XHTML 1.1 now. And an IE that allows you to deliver XHTML 1.1 as XML MimeType :)

  • I thought the plan for the CSS adapters was to maintain existing functionality, but render the html in css compliant/friendly way? The treeview doesn't have a way to fire server-side postbacks when a checkbox in the treeview is clicked. The checkchanged events fire when a postback from some other event occurs. This makes a huge assumption that users only want to use the checkboxes in a certain way and it certainly doesn't follow the functionality of the normal treeview control.

    I don't see a problem with adding new functionality (such as the cascading check functionality), just so long as the control is still backwards compatible.

  • Hi Scott,
    where can I found plan of later releases of CSSControlAdapters? I need axaj-driven populateOnDemand feature. How can this be achieved.

    Tomas

Comments have been disabled for this content.