Reputation: 12874
I am developing a website in ASP.Net.. Is it good to develop the Styles using Themes with SkinFile or CSS as we use in HTML
Which is best?
Upvotes: 2
Views: 2118
Reputation: 812
With regard to your question, if all what you need is styling, then I would recommend the CSS way, especially because of its performance benefits, since it can be cached and does not cause any overhead in the Server.
Upvotes: 0
Reputation: 7525
Themes vs. Cascading Style Sheets
Themes are similar to cascading style sheets in that both themes and style sheets define a set of common attributes that can be applied to any page. However, themes differ from style sheets in the following ways:
* Themes can define many properties of a control or page, not just style properties. For example, using themes, you can specify the graphics for a TreeView control, the template layout of a GridView control, and so on.
* Themes can include graphics.
* Themes do not cascade the way style sheets do. By default, any property values defined in a theme referenced by a page's Theme property override the property values declaratively set on a control, unless you explicitly apply the theme using the StyleSheetTheme property. For more information, see the Theme Settings Precedence section above.
* Only one theme can be applied to each page. You cannot apply multiple themes to a page, unlike style sheets where multiple style sheets can be applied.
Please go to msdn for more detail:
Upvotes: 1
Reputation: 17804
ASP.NET Controls can have properties set using skin files. For instance you can define that every button on your site needs the following properties:
<asp:Button runat="server"
BackColor="Red"
ForeColor="White"
Font-Name="Arial"
Font-Size="9px" />
It is a way to generalize styling for your website but nothing that can't be done using CSS alone.
Upvotes: 0