ASP.NET
  Home arrow ASP.NET arrow The Beauty of ASP.NET 2.0 Themes in Visual...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

The Beauty of ASP.NET 2.0 Themes in Visual Studio 2005
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 51
    2006-04-10

    Table of Contents:
  • The Beauty of ASP.NET 2.0 Themes in Visual Studio 2005
  • A simple demonstration of ASP.NET 2.0 skins and themes
  • How to create and apply different skin elements to the same Web Server Control
  • How to create and apply Cascading Style Sheets to an ASP.NET 2.0 theme
  • How to apply ASP.NET 2.0 themes at runtime: creating theme and skin
  • How to apply ASP.NET 2.0 themes at runtime: working with code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Beauty of ASP.NET 2.0 Themes in Visual Studio 2005


    (Page 1 of 6 )

    This article introduces you to “ASP.NET 2.0 Themes” with the Visual Studio 2005 Integrated Development Environment. The sample downloadable application was developed using Visual Studio 2005 Professional Edition on Windows Server 2003 Standard Edition.
    A downloadable file for this article is available here.

    Understanding “Themes” in ASP.NET 2.0

    Any commercial website needs to spruce up its appearance now and then. Even though the appearance of a website may get modified periodically, the consistency of the entire website should always be maintained.

    The most important issues for consistency are the coloring methodology and other look and feel strategies. In general, to maintain consistency throughout a website, style sheets (Cascading Style Sheets) have been a good choice. Style sheets have been introduced with DHTML, even before any server side technology was invented.

    And later style sheets have been directly integrated into (almost) every server side technology available (along with ASP.NET). Applying CSS to HTML seems to be simple and easy, but applying the same to ASP.NET Server controls can be confusing, because it is up to the developer to know which HTML tags are rendered by the control and how they are rendered.  Keeping such scenarios in mind, Microsoft introduced a new feature in ASP.NET 2.0 called “themes.”

    Before understanding “themes,” we need to understand the concept of “skin.” A skin generally contains visual properties (for look and feel strategies) for one or more kinds of ASP.NET controls (server controls).  Every skin is made with a set of skin tags, which are typically based on XML and XSLT specifications. At this movement (at the time of this writing), Visual Studio 2005 doesn’t have any intellisense support to work with skin tags. It is the developer’s responsibility to figure out the syntax of every skin manually.

    Coming to the concept of “themes,” a theme is simply a collection of several skins and style sheets together with images. A theme really makes a web developer’s life very easy as they can define the appearance for a set of controls at design time and make them look coherent to the overall application. Web developers can apply theme to the application at control, page or application levels.  This article mainly concentrates on the following issues:

    • designing skins
    • creating themes based on the skins
    • applying themes to web pages
    • applying two different appearances for the same kind of controls
    • creating and applying Cascading Style Sheets to the theme
    • applying themes at runtime.

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello guys. Now you can get into ASP.NET 2.0 themes using Visual Studio 2005 with...
       · how do i apply a theme at runtim to all the pages of my site (without explicitly...
     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek