Using Style Sheet with ASP.NET 2.0

ASP.NET offers a number of ways to assign a theme to content pages.

<%@ Page Language="C#" StylesheetTheme="Blue" %>

Assign it globally to the entire application by adding the following instruction to the web.config file:

<system.web>
      <pages styleSheetTheme="Blue" />
</system.web>

 

Steps:

Create a Folder in the name "Blue" under App_Themes.

Place your CSS File under this (App_ThemesBlueMyCSS.css)

Refer this in the <SYSTEM.WEB> section under WEB.CONFIG.

 

Instead of refering the CSS in all the pages, by placing an entry in WEB.CONFIG, it automatically gets reflected in all the pages.

 

More information is available here.

http://msdn.microsoft.com/asp.net/reference/design/documentation/

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s