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
<table> 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.
You can learn more about adapters, in general, and CSS Friendly adapters, in particular, by visiting:
Russ Helfand
Contributor
3304 Points
744 Posts
Introduction to this forum
May 25, 2006 03:42 PM|LINK
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 <table> 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.
You can learn more about adapters, in general, and CSS Friendly adapters, in particular, by visiting:
http://www.asp.net/CSSAdapters/Default.aspx
http://weblogs.asp.net/scottgu/archive/2006/05/02/CSS-Control-Adapter-Toolkit-for-ASP.NET-2.0-.aspx
This forum is a place to discuss these adapters, suggest enhancements, post experimental versions of new adapters, etc.
Groovybits.com