PDA

View Full Version : ASP.NET Bloated HTML - Can it go in a .CSS?


Quiz
02-14-2005, 02:40 PM
Hi,

I've just started with ASP.NET but I have noticed that the output of the web controls (such as a calendar) produces repeated style and tag properties which could be placed in a class definition.

Is there a way to force this behavior for the web control?

miranda
02-15-2005, 06:47 AM
Many of the webcontrols have a property called cssclass. This can be set at designtime via the properties tab if you are using VStudio or web matrix. And also at runtime using the following syntax TextBox1.CssClass = "myclass"

gwendaal
02-15-2005, 07:08 AM
each big webcontrol like datagrid or calendar or tabbrowser are coming with an horrible html and css code
thats the reason why i never use them
if you build your own repeater you can get XHTML + CSS