Skip to content

Link CSS to my Master Page

To Be

To Be

Asked Jun 7, 2015, 4:21 AM EDTSolved
Share
LinkedInX
Dear All,
 
I have this code  in my Master Page to apply the Style on the master page .
 
<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="MyMaster.master.vb" Inherits="MyWebSite.Site" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
<link href="~/Style_Files/MyStyle.css" rel="stylesheet" type="text/css" />
<link href="~/Style_Files/Lists.css" rel="stylesheet" type="text/css" />
<script src="~/My_Scrpits/script_jmenu.js" type="text/javascript"></script>
<style type="text/css">
.style1
CSS
        {
            width: 100%;
        }

.auto-style1 {
background-color: #ac061a;
font:bold;
        }
 
but it always give me this error :
 
 

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'MyWebSite.Home'.

Source Error:

 
 Line 1: <%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MyMaster.Master" CodeBehind="Home.aspx.vb" Inherits="MyWebSite.Home" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>
Line 2: <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
 
 
 can you help me on that ?

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Manoj Bhoir
    ✓ Accepted answer0
    Hi,
     
    This is not CSS linking problem. Check you Home page there must be something wrong with your Home page name or codebehind class name that is why it gives you error :
     
    Could not load type 'MyWebSite.Home'. 
     
    Check Inherits part it should be proper and inculding your namespace.
    0
  • 1 short reply
    • To Be
      0
      Thanks IT worked :)
      0