views:

196

answers:

2

Hi, I am writing asp.net website which will going to be host on public network. I don't have very much knowledge about AppTheme specially utilizing theme, css and skin in asp.net 2.0.

Previously i have worked with asp and asp.net 1.0 where i only write css class and write attribute class="***" inside every control where i want to have css.

I don;'t know whether this is right practice with asp.net 2.0 because in asp.net 2.0 we have advance features like theme and skins.

So can i have help from you so that i can use theme, css and skin in best way . Also i would like to know how different is using css with asp.net 2.0 AS COMPARE WITH PREVIOUS VERSION.

+1  A: 

Themes are made up of a set of elements: skins, cascading style sheets (CSS), images, and other resources. At a minimum, a theme will contain skins. Themes are defined in special directories in your Web site or on your Web server.

Here are some links from MSDN that will help you get started:

Also, I would recommend Scott Allens article on Themes In ASP.NET 2.0 for a quick overview and some samples: http://www.odetocode.com/articles/423.aspx

Espo
A: 

Your work shouldn't change that much (if you're working with a single theme).

  1. Your CSS classes will stay as they are at the moment - they'll be used on the client side
  2. You'll add skin files to your theme - these are used for server control style settings

The main difference is that you're able to define several different themes at the same time. Otherwise it depends on you how simple your HTML is. The best way is to not include any style information inside your ASPX files. You should use only use classes. Everything else should be styled within your CSS files.

Oh and BTW: all your CSS files within your App_Themes/Theme folder will be automagically added to your pages. You don't have to explicitly add them to your Master/Aspx page.

Robert Koritnik