Skip navigation.

Design-By-Contract with Spec#All recent postsSo How Do You Set The Last-Modified Header?

Are ASP.NET Themes Worth The Trouble?

The debate of tables vs. divs has been waged on so many occasions that I feel discussing it is like beating a dead horse. I abandoned tables-for-layout four years ago and never looked back. I recommend you to do the same. Nonetheless, Peter’s recent post mentioned ASP.NET themes, which got me thinking.

I’ve never used theming support in ASP.NET. To me, themes are redundant and unnecessary. I think the cost of their maintenance is simply not worth it. The devil is in the details, and once you run into limitations of skins (and you will!), you begin chasing your tail. Instead of focusing on what you really want from your markup, you’re looking for yet another way to bend a rigid frame. Rigid frames don’t bend, they break.

Some features look good on paper, score talks at TechEd, fill chapters in books, but are useless in real life. If you want to do it right, stick to plain CSS files (maybe page-level or inline CSS rules here and there) and you’ll do just fine.

Comments

Comment permalink 1 Sebastien Lambla |
What about non-CSS properties on asp.net controls?
Comment permalink 2 Nebbercracker |
I agree. Themes are cool if you are new to design and you have no clue of what is really out there. Once one see's the light (semantic markup and CSS for presentation), there is no turning back.
Comment permalink 3 Milan Negovan |
Sebastien, in my opinion, having skins initialize control properties is even a bigger offense.

Think about it this way: a control is a class. Even though we're talking about presentational attributes, they are still class properties.

If you need a group of controls to have a common theme, my suggestion is to subclass from a control. At least you're preserving the "is a" relationship this way.
Comment permalink 4 Sebastian |
nice post!

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

TrackBacks

Sorry, TrackBacks are not allowed.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):