Sunday, June 3, 2012

Asp.net set theme : Theme vs. StyleSheetheme

You can set the theme of an asp.net page using the StylesheetTheme or Theme property

What is the difference between two?
If you use the StyleSheetTheme attribute, settings can be overridden because properties defined by StyleSheetTheme are applied before a page’s control property set. If you use the Theme attribute, settings cannot be overridden because properties defined by Theme are applied after a page’s properties.


If you provide both the properties, aspnet takes the value specified in "theme" property.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" StylesheetTheme="black" Theme="red" %>

No comments:

Post a Comment