Tutorial :Do you mix and match CSS 'and' ASP.NET .Skin files?


Is it CSS for HTML elements and SKINS for ASP controls? Or is it CSS all the way even thought it seems to take longer? And what has Specivity SKINS or CSS?

I ask because I'm creating my first ASP.NET web application (using a book), while at the same time reading another about CSS. I'm now at the point where I need to start thinking about layout in my ASP book, and I'm slightly confused.

According to book: SKINS allow me to tell all Web Controls like TextBoxes/Labels to be a certain colour, font, etc site wide quite easily and centrally.

CSS is wonderful at managing layout and style as well and is easy (wrong word but correct sentiment I think) to implement,

However, when it comes to ASP.NET it will require more work. I will need to add the CssControl property to all Web Controls to attach my style/Class. Which seems to make using SKINS the better option when thinking about WEB Controls.


Each for its own. They do not overlap. CSS is the only thing that actually makes difference in appearance. Skins or not, in the end it boils down to CSS classes and style attributes, because that is the only thing that the browser understands.

Skins however allow you to globally set some properties for a type of control. It's not limited only to appearance things. Yes, you can set the CssClass and Style properties, but you can also set other properties as well. It's like a global override and default value storage.


I, personally, do not use skin files. Even when I have themes, I work solely with CSS. As far as the "why" of skins, they are for ASP.NET controls, but you have to determine if it makes sense to "mix metaphors", so to speak.

I can think of nothing that skins offer me over straight CSS.


I agree with @Vilx - they don't really overlap.

I use the .skin files mainly for changing control properties like Visible (stopping the whole control from rendering), instead of just hiding it. In some cases I set the CssClass property or ImageUrl. This can be done in code, but skins externalize it nicely.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »