Hakan Zim
Hakan Zim

Reputation: 305

Style sheet not loading

I have setup a local website on a new IIS server 8, but the style sheet is not loaded.

master page is referencing the style sheet as

href="/HeadOffice/Styles/HeadOfficeCalendar.css"

as in:

<link rel="stylesheet" href="/HeadOffice/Styles/HeadOfficeCalendar.css" type="text/css" media="all" />

Site home page is

//localhost/TESTFESTOON/HeadOffice/home.aspx

physical path for the styles folder is

E:\inetpub\ForRelease\HeadOffice\Styles

some of the images are also not loading

Upvotes: 0

Views: 633

Answers (2)

Deepak
Deepak

Reputation: 66

Try this syntax, this will generate the correct URL

     <link type="text/css" rel="stylesheet" 
    href='<%= Server.ResolveClientUrl("~/HeadOffice/Styles/HeadOfficeCalendar.css") %>' />

Upvotes: 1

IrishChieftain
IrishChieftain

Reputation: 15252

Drag the CSS file from Solution Explorer to the code view of your master page and see if that fixes it.

Alternatively, try this syntax:

<link rel="stylesheet" 
    href="<%= ResolveUrl("~") %>HeadOffice/Styles/HeadOfficeCalendar.css" 
        type="text/css" media="all" />

Upvotes: 0

Related Questions