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

Discussion in 'ASP .Net' started by aleko, Feb 25, 2005.

  1. aleko

    aleko Guest

    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
     
    aleko, Feb 25, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Honn
    Replies:
    3
    Views:
    3,244
    Teemu Keiski
    Apr 4, 2005
  2. Randall Parker
    Replies:
    1
    Views:
    578
    Kevin Spencer
    Oct 28, 2005
  3. =?ISO-8859-1?Q?Gregory_Pi=F1ero?=

    Urllib.encode() - How does it Treat a List?

    =?ISO-8859-1?Q?Gregory_Pi=F1ero?=, Jul 28, 2006, in forum: Python
    Replies:
    0
    Views:
    291
    =?ISO-8859-1?Q?Gregory_Pi=F1ero?=
    Jul 28, 2006
  4. Terry Reedy
    Replies:
    1
    Views:
    259
    Peter Otten
    Jul 21, 2010
  5. RGB
    Replies:
    5
    Views:
    224
    John Saunders
    Jan 7, 2005
Loading...

Share This Page