To
apply a theme to a Web site
- In the application's Web.config file, set the <pages> element to the
name of the theme, either a global theme or a page theme, as shown in the
following example:
Eg:
<configuration>
<system.web>
<pages theme=”BlueMoon”
/>
</system.web>
</configuration>
<configuration>
<system.web>
<pages styleSheetTheme="Themename"
/>
</system.web>
</configuration>
3.The
following examples show you how you can define a theme named
"SmokeAndGlass" in your application by different methods:
<%@ Page Theme="SmokeAndGlass"
Language="C#"%>
4.Themes can
be set programmatically under the Page_PreInit event handler. It is necessary
to define them in this event handler as all the looks are applied to the server
controls defined in a particular theme before the page loads. Here is how you
can set themes programmatically:
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.PreInit
Page.Theme = "SmokeAndGlass"
End Sub
No comments:
Post a Comment