Re: Referencing root document in <IMG> tag...

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Sep 21, 4:48 am, "Bobby Edward" <bo...@xxxxxxxxxx> wrote:
I have a subdirectory with an aspx page that references a master file
located in the root.

In the master file template I reference a logo/image that is in
<root>/resources...
<img alt="logo" src="./resources/logo.png" />

For some reason when I pull up the page in the subdirectory it only shows
the alt tag because i think it can't find the png.  Any idea why?

Other references used in the master file template are ok, such as...
<asp:Hyperlink runat="server"
NavigateUrl="./register.aspx">Register</asp:Hyperlink>

It finds the register.aspx in the <root> of the website.

Can you help me?  Thanks!

Because Hyperlink is a server control, and img is an html tag. Calling
this

<img alt="logo" src="./resources/logo.png" />

from the http://root/subdir/page.aspx would call an image from
http://root/subdir/resources/logo.png

If your master is always in the root, there is no reason to use "." in
the url.

Use this

<img alt="logo" src="/resources/logo.png" />

to tell to all content pages that the image location is in the <root>/
resources

Hope this helps
.



Relevant Pages

  • Re: Reference for a cubic with a double root?
    ... self-evident to those who do remember their Algebra ... A 'Calculus' approach according to which there will be a double root ... I still need a reference where the condition ... is a reason that D is called "discriminant", ...
    (sci.math)
  • Re: Poliferation of MSXML4...-enu.log and long dirs being create
    ... root of your primary boot drive? ... but one for every installation of KB927978 on the ... but it's intended (for whatever reason). ... See http://support.microsoft.com/kb/927978 for your reference. ...
    (microsoft.public.windowsupdate)
  • Re: Truth
    ... We examine everything in reference to everything. ... mind is torn from its premises - and then the premises are reexamined, ... "The premise of my rationality is living on earth" - then ... education - if money is the root of all evil then what is the root of ...
    (soc.culture.china)
  • Re: Truth
    ... who can afford some much time for such TRUTH. ... We examine everything in reference to everything. ... "The premise of my rationality is living on earth" - then ... education - if money is the root of all evil then what is the root of ...
    (soc.culture.china)
  • Re: Truth
    ... We examine everything in reference to everything. ... mind is torn from its premises - and then the premises are reexamined, ... "The premise of my rationality is living on earth" - then ... education - if money is the root of all evil then what is the root of ...
    (soc.culture.china)