Free web hosts - You ll need the similar style rules in each
You ll need the similar style rules in each theme folder s StyleSheet.css page, though the colors and other stylistic options you choose would vary from one theme folder to the next. In the code-behind file for the Master Page (MasterPage.master.cs in my example), add Page_PreInit code to apply the user s preferred theme. The code is no different from the code you d use in an .aspx page. So, in my example, it would look like this: public partial class MasterPage : System.Web.UI.MasterPage { // On pre-initialization apply user s preferred theme. protected void Page_PreInit(object sender, EventArgs e) { if (Profile.PreferredTheme == null) { Page.Theme = DefaultTheme ; } else { Page.Theme = Profile.PreferredTheme; } } } Whether to allow users to customize Master Pages is really something you have to decide for yourself. There s no rule that says a site can only have one Master Page. The fact is, a site can have as many Master Pages as you like. As an alternative to allowing users to customize the Master Page for your site, you could have two Master pages. Use one fixed-and-unchanging Master Page for general pages. Then create a second Master Page for privileged content only, and allow users to set styles within that Master Page only. Other Ways to Apply Themes In all of the above examples of applying themes, you used the syntax Page.theme=Profile.PreferredTheme to apply the user s preferred theme to a page. Here s another syntax you can use as an alternative: Page.StyleSheetTheme = Profile.PreferredTheme; The difference between using Page.Theme and using Page.StyleSheetTheme is as follows: 218 Part III: Personalization and Databases
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.