Tuesday, December 05, 2006

Better CSS for ASP.NET 2.0 controls

ASP.NET controls have a weird tendency to write a lot of old fashioned HTML and Visual Studio tends to encourage styling on a control basis. The new Expression tools are better about making CSS style layouts so hopefully that will come to Visual Studio.

Until then, here are some Control Adapters to help some of the messier controls. The updated controls include GridView, DataList, DetailsView, FormView, Menu and Login.

Control adapters are part of a ASP.NET 2.0 extensibility layer that lets you change the rendering output of a control so you can write your own if there is something you need that isn't in this kit. The treeview for example, renders hidden and uses a lot of javascript to show expanded nodes. If you wanted to emphasise usability, you might want to reverse this to use javacript to hide hidden nodes so that a non-javascript client could still reach all the nodes.

0 Comments:

Post a Comment

<< Home