CSS friendly ASP.NET 2.0 control adapters Beta 1.1
- 0
- Add a Comment
- No Related Post
CSS friendly ASP.NET 2.0 control adapters while still in Beta, are still very much available for download. Don’t shy away, give ‘em a shot! You may just surprise yourself…
Introduction
ASP.NET is a great technology for building web sites but it would be even better if it rendered different HTML. For example, the Menu control makes it simple to add a menu to a web site but it would be better if it didn’t create
tags and was easier to style using CSS. Happily, it’s easy to “teach” the Menu control how to generate the kind of HTML that you prefer. Indeed, you can modify any ASP.NET control so it produces better HTML.
The key is to use something that may be new to you: control adapters. These are little chunks of logic that you add to your web site to effectively “teach” an ASP.NET control how to render better HTML.
Getting Started
Before trying to learn how control adapters work, it’s helpful to see them in action. Use the Examples menu at the top of this page to see the impact of adapting five controls: Menu, TreeView, DetailsView, FormView and DataList.
Each example page lets you enable/disable the adapters so you can immediately see their impact. Likewise, you can dynamically change themes, swapping in a different set of CSS files without changing the HTML markup. A source code viewer lets you study how each sample is constructed.
These sample control adapters demonstrate how to build an ASP.NET web site that is particularly easy to style with CSS. Feel free to use, copy, clone and modify the markup, CSS and code that you find here. Or, use these samples merely to a way to stimulate your own ideas for adapters that will improve your web site. As with all things from Microsoft, this site is dedicated to helping you reach your potential.
The DetailsAfter spending some time exploring this web site’s example pages, turn to the white paper for details of how adapters work in general and how these samples work in particular.
Known IssuesThere are no known issues with using the adapters in your pages, however we are aware of some rendering issues (view source specifically) with IE7 Beta 2 in the included sample site. This is a known IE7 bug that will be fixed for IE7 Beta 3. Please report all other issues in the forum. Source: ASP.net
What Do You Think?
33 queries / 0.270 seconds.
