Attach Style Sheet to nested pages

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" />
 
H

HillBilly

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.
 
C

Chris Salter

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top