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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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: 4 stars4 stars4 stars4 stars4 stars / 45
    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

    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT