Sir
I have removed the styleSheetTheme from my web.config file then total color removed from all the page even if the theme is set in the web.config.
and if both theme and styleSheetTheme is set in the web.config file then all is well for monochrome theme but the header image of DarkGrey does not display.
here is the code of my master page.
Code:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Frontend.master.cs" Inherits="MasterPages_Frontend" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div id="PageWrapper">
<div id="Header">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<div id="MenuWrapper">Menu Goes Here</div>
<div id="MainContent">
<asp:ContentPlaceHolder ID="cpMainContent" runat="server" >
</asp:ContentPlaceHolder>
</div>
<div id="Sidebar"></div>
<div id="Footer">Footer Goes Here</div>
</div>
</form>
</body>
</html>
adn below is the code of MasterPage.cs
Code:
sing System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class MasterPages_Frontend : System.Web.UI.MasterPage
{
}
below is the BasePage code
Code:
using System;
using System.Web;
public class BasePage : System.Web.UI.Page
{
private void Page_PreRender(object sender, EventArgs e)
{
if (this.Title == "Untitled Page" || string.IsNullOrEmpty(this.Title))
{
throw new Exception(
"Page title cannot be \"Untitled Page\" or an empty string.");
}
}
private void Page_PreInit(object sender, EventArgs e)
{
HttpCookie preferredTheme = Request.Cookies.Get("PreferredTheme");
if (preferredTheme != null)
{
Page.Theme = preferredTheme.Value;
}
}
public BasePage()
{
this.PreRender += new EventHandler(Page_PreRender);
}
}
and here is the code of my default page
Code:
<%@ Page Title="Default Page" Language="C#" MasterPageFile="~/site/MasterPages/Frontend.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="site_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
<div id="MainContent0">
<h1 class="Introduction">
Hi there visitor and welcome to Planet Wrox</h1>
<p class="Introduction">
We're glad you're paying a visit to <a href="http://www.PlanetWrox.com">
www.PlanetWrox.com</a>, the coolest music community site on the Internet.
</p>
<p>
Feel free to have a <a href="Default.aspx">look around;</a> there are lots of
interesting <strong>reviews and concert pictures</strong> to be found here.
</p>
<p>
You can <a href="../Login.aspx">log in</a> here.</p>
</div>
</asp:Content>