Master Page not rendering css item

Jul 20 2010 8:56 AM
Basically the login page doesn't pick up the css style from that is used in the master page that the login page
uses.
I tried the same master and css with another page and it works so now I am thinking its a problem with 
redirection to the login page by web.config settings ? I don't know I am stuck any help would be appreciated

CSS file contents
File Name: StyleSheet.css

#pagelogo
{
   
    background-color: #000080;
    color: #d3d3d3;
    vertical-align: middle;
    padding: 10px;
    font-size: 150%;
   
}



Master Page file contents
Name : TopLevel.master

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="TopLevel.master.cs" Inherits="TopLevel" %>

<!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>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
 
</head>

<body>
    <form id="topLevelForm" runat="server">
    <div>
       
       <table width="100%" border="0" cellpadding="5" cellspacing="0">
            <tr>
                <td  id = "pagelogo" >
                    <h1>DSF Events Intranet</h1><h2>&nbsp;-&nbsp;<asp:Literal ID="pageTitleLiteral" runat="server"></asp:Literal></h2>
                </td>
            </tr>
 
             <tr>
                <td>
  
            <asp:contentplaceholder id="TopContentPlaceHolder" runat="server">
            </asp:contentplaceholder>
          
                 </td>
            </tr>
      </table>
    </div>
    </form>
</body>
</html>
 


Login page contents
Name : Login.aspx

<%@ Page Language="C#" MasterPageFile="~/TopLevel.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Title = "Login"%>

<asp:Content ID="Content1" Runat="Server" ContentPlaceHolderID="TopContentPlaceHolder">
    <asp:Login ID="Login1" runat="server" ForeColor="Black">
    </asp:Login>
   
    <asp:PasswordRecovery ID="PasswordRecovery1" runat="server" ForeColor="Black">
        <MailDefinition From="[email protected]">
        </MailDefinition>
    </asp:PasswordRecovery>
   
</asp:Content>

Web.config file contents
FileName: Web.config
 

<?xml version="1.0"?>

<configuration>
    <appSettings/>
    <!-- Connection string for the local instance of SQL Server 2005. For improved security, you are advised to encrypt connection strings. -->
    <connectionStrings>
        <add name="DSFEventsSQL" connectionString="Data Source=(local); Initial Catalog=DSF_Events_Access; Integrated Security=True; Persist Security Info=False" providerName="SqlProvider"/>
        <add name="MembershipConnection" connectionString="Data Source=Localhost;Initial Catalog=aspnetdb;Integrated Security=SSPI;"/>
    </connectionStrings>
    <system.web>

        <compilation debug="true"/>

        <authentication mode="Forms">
            <forms loginUrl="~/Login.aspx" />
        </authentication>

        <authorization>
            <deny users ="?"/>
        </authorization>

        <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
            <providers>
                <clear />
                <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider"
                   connectionStringName="MembershipConnection"
                   applicationName="MyApplication"
                   enablePasswordRetrieval="true"
                   enablePasswordReset="true"
                   requiresQuestionAndAnswer="true"
                   requiresUniqueEmail="true"
                   passwordFormat="Clear" />
            </providers>
        </membership>


        <roleManager cacheRolesInCookie="true" enabled="true" defaultProvider="SQLProvider">
            <providers>
                <add name="SqlProvider"
                           type="System.Web.Security.SqlRoleProvider"
                           connectionStringName="MembershipConnection"
                           applicationName="MyApplication" />
            </providers>
        </roleManager>

    </system.web>
</configuration>






Answers (2)