[Original address] Tip/Trick: Use the ASP. NET 2.0 CSS Control Adapters for CSS friendly HTML output
[Original article publication date] Wednesday, November 29,200 6 PM
I'm tired of using the built-in ASP. NET Server-side controls to generate HTML <table> elements, but hope you can use pure CSS solutions? If so, read it...
Last week, we released the official version 2.0 of the ASP. NET 1.0 CSS control adapter. These adapters use ASP. NET 2.0 is a new scalability feature called "control adaptation architecture" that allows developers to override, modify, or fine tune (tweak) display and output logic of existing server controls without modifying the properties of controls, supported events or programming models.
ASP. NET 2.0 CSS control adapter provides 11 most commonly used ASP.. NET Control pre-fabricated control adapters. These controls include GridView, DetailsView, FormsView, DataList, Menu, TreeView, Login, LoginStatus, CreateUserWizard, ChangePassword, and PasswordRecovery. The CSS control adapter will make these ASP. the NET Control emits CSS-friendly HTML output, which is extremely useful when CSS is used on your website except for the style and <table> elements in the row.
Click any of the following connections to see how they change the IDS generated by these built-in ASP. NET controls before and after:
Menu
TreeView
DetailsView
FormView
GridView
DataList
Login
ChangePassword
PasswordRecovery
CreateUserWizard
LoginStatus
The CSS control adapter toolkit also contains the VB and C # source code of all the preceding control adapters. You can use the source code as is to get pure CSS output without making any changes. Or, if you want to further refine the output, you can modify these adapters to generate any custom IDS you want.
I posted a good tutorial two months ago to demonstrate how to use the CSS control adapter. I strongly recommend that you read it and learn how to get started.
Scott Mitchell posted a good article on CSS control adapters at www.4guysfromrolla.com earlier today, discussing how to use them.
You can ask questions and get help on how to use them on the http://www.asp.net's CSS Control Adapters forum.
I hope this article will help you,
Scott