Keep in mind that ~ only works if the image is a server
control (i.e.,
runat="server"). If not, the ~ is not interpreted
and passed directly on to
the client, which of course does not know what ~ means.
/Rex
-----Original Message-----
From: David Caver [mailto avidCave
r verizon.net]
Sent: Saturday, July 21, 2007 1:18 PM
To: aspnet aspadvice.com
Cc: mike efactory.ca
Subject: [aspnet] RE: Problem with Masterpage images and
nested folder and
site root
Try using "~/images/". The ~ will take you to the
root of the site.
David Caver
-----Original Message-----
From: Mike Elmalem - Efactory Inc [mailto:mike efactory.ca]
Sent: Saturday, July 21, 2007 9:00 AM
To: aspnet aspadvice.com
Subject: [aspnet] Problem with Masterpage images and nested
folder and site
root
Hello
I just started learning how to use MasterPages and I hit my
first road
block. I am new to .NET and don't know how to solve this
issue.
My issue is that I have a master page file in project root
and I have a
folder called images in the root as well. I created a new
page in
another folder in the root called admin that uses the same
masterpage
file in the project root.
So it looks like this
default.aspx
masterpage.master
/images
/admin/admin.aspx
The default page in the root works find since all the image
links are
src="images/ but all the images in the admin.aspx are
missing since
technically the path is src="../images
I tried src="/images/ but this does not work when I use
view in browser
on my local machine using visual studio 2005. Is there a
way to set
that image path globally so that I am able to place
templates wherever I
want?
Thanks,
Mike
--
Mike Elmalem
eFactory Inc.
Main. 905-669-8056 ext 1
Cell. 416-836-9460
Fax. 905-669-8056
--- List Settings ---
http://aspadvice.com/list
s/
--- List Settings ---
http://aspadvice.com/list
s/
--- List Settings ---
http://aspadvice.com/list
s/
|