What is the difference between the Theme and StylesheetTheme?

 Posted by Virendradugar on 12/4/2009 | Category: ASP.NET Interview questions | Views: 10652

The StylesheetTheme attribute works same as the Theme attribute.The difference is that the when attributes are set locally on the page within a particular control, the attributes are overridden by the theme if you use the Theme attribute. They are kept in place, if you apply the page’s theme using the StylesheetTheme attribute. Suppose you have a text box control like the following:

<asp:Textbox ID=”TextBox1” Runat=”server”

ForeColor=”#ffffff” />

In this example, the ForeColor settings is overridden by the theme if you have
applied it using the Theme attribute in the Page directive. If, instead, you applied the theme using the StylesheetTheme attribute in the Page directive, the ForeColor settings remain in place, even if they are explicitly defined in the theme.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response