Attach Style Sheet to nested pages

  • Thread starter Thread starter pvong
  • Start date Start date
P

pvong

Newbie trying to learn in vb.net running VS2008

If I have a MasterPage, I can attach the style sheet in the content page.
But if I have a nested MasterPage, I can not attach the style sheet of the
content page of the nested MasterPage. I get the error that file can not be
found. This is my header:

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPageClient.master"
AutoEventWireup="false" CodeFile="OnePercentAssignment.aspx.vb"
Inherits="OnePercents_OnPercentAssignment" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ClientBody" Runat="Server">

<link href="App_Themes/Croft/ClinxStyleSheet.css" rel="stylesheet"

type="text/css" />
 
Read about MasterPages at http://odetocode.com/

And putting a <link /> element into <asp:Content /> is not the way to load a
stylesheet. I haven't worked with nested Masters so I can't help further but
to point out what I have.
 
in your link href make sure your path starts with / as this will ensure your
reading from the root of the website,
you'll be surprised how much of a simple fix it may be
 
Back
Top