Does ASP.NET treat <header> differently than the rest of the html?

A

aleko

Hi,

Recently I moved a website to a different machine for testing, and I
needed to replace the absolute site urls in my stylesheet links.
Instead of something like href="/blah/style.css" they were to say
something like href="<%# Settings.SiteRoot %>style.css". And the
relevant code:

public class Settings
{
public static string SiteRoot()
{
return Configuration.AppSettings["SiteRoot"];
}
}

This works on some pages, but not on others. Sometimes the <link> tag
contains the correct path ("/blah/style.css"), and other times (on the
same master page!) the href contains "style.css". No exceptions, no
compilation problems. Just on some pages the settings aren't read.

Now the interesting part is that all the images on the site use the
same mechanism to get the path, and they always work, on every page.
Whatever the cause for this bizarre behaviour, it is 1) consistent, and
2) affects only headers.

Any comments on this?

-Aleko
 

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,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top