Re: sharing master page question
- From: "Cirene" <cirene@xxxxxxxxxxx>
- Date: Sun, 18 May 2008 20:56:59 -0400
I want to do everything relative if possible. If I put the image on my
website it will probably work, yes. But, i want it to be relative. Thanks.
"Nathan Sokalski" <njsokalski@xxxxxxxxxxx> wrote in message
news:eDt4WdPuIHA.4528@xxxxxxxxxxxxxxxxxxxxxxx
Do you have a response to my question about whether there is a URL for the
file you can enter directly into the address bar that will display the
image?
--
Nathan Sokalski
njsokalski@xxxxxxxxxxx
http://www.nathansokalski.com/
"Cirene" <cirene@xxxxxxxxxxx> wrote in message
news:esPBOOOuIHA.6096@xxxxxxxxxxxxxxxxxxxxxxx
I tried both and they didn't work in both browsers. Maybe my PC is
possessed! :-x
"clintonG" <nobody@xxxxxxxxxxx> wrote in message
news:OCBVfNJuIHA.1236@xxxxxxxxxxxxxxxxxxxxxxx
The root path operator will function with anything marked runat="server"
"Nathan Sokalski" <njsokalski@xxxxxxxxxxx> wrote in message
news:%23cjcpq6tIHA.2208@xxxxxxxxxxxxxxxxxxxxxxx
Is there any URL you can enter directly into the address bar that is
the URL of the file (such as
http://localhost:49646/resources/banner.jpg) that will display the
image? If there is, what is it? Did you double-check to make sure the
file is really where you think it is? (NOTE: The ~/path/ technique only
works with server-side controls, so it would not work with the img tag
example you included)
--
Nathan Sokalski
njsokalski@xxxxxxxxxxx
http://www.nathansokalski.com/
"Cirene" <cirene@xxxxxxxxxxx> wrote in message
news:OHucxX5tIHA.2208@xxxxxxxxxxxxxxxxxxxxxxx
Thanks for the info.
I tried both ~/path/ and /path/ and in IE and Firefox it shows up as a
emtpy box with a x in it.
Actual html image portion was as follows...
<img alt="My Picture" src="/resources/banner.jpg" width="780"
height="124" />
Any ideas? Thanks!
"Nathan Sokalski" <njsokalski@xxxxxxxxxxx> wrote in message
news:OHSL8N5tIHA.5268@xxxxxxxxxxxxxxxxxxxxxxx
You are obviously using relative URLs in your code, which is good,
but when files in different directories are involved in the same
page, it is good to make sure they will all work for that page (and
all pages they are used in). Here are a few ideas that may help:
1. For directories that are used by almost all pages (and Master
pages and UserControls), such as an /images/ directory for example,
it is good to write it as /images/ rather than images/ so that it is
relative to the root instead of the current directory. This will save
you the trouble of needing to worry about whether to use the
directory of the Page, Master Page, UserControl, CSS file, JavaScript
file, etc.
2. For any server controls, you can use ~/path/ The ~ represents the
root of the site. For more details on this, see the documentation.
Even though this may sometimes make your URLs longer than is always
absolutely necessary, it can usually save you a lot of trouble and
make it easier to modify code later in development. Hopefully some of
this helps.
--
Nathan Sokalski
njsokalski@xxxxxxxxxxx
http://www.nathansokalski.com/
"Cirene" <cirene@xxxxxxxxxxx> wrote in message
news:udPiy72tIHA.5096@xxxxxxxxxxxxxxxxxxxxxxx
I have 1 master page in the root of my website that I would like to
share with all pages, even those in my /admin and /client
directories. But when pages in the subdir's are viewed the img, css,
etc... references are incorrect because they are "root based". Any
suggestion as to how to overcome this? Or do I have to create
another Master Page for the subdir pages?
Thansk!
.
- References:
- sharing master page question
- From: Cirene
- Re: sharing master page question
- From: Nathan Sokalski
- Re: sharing master page question
- From: Cirene
- Re: sharing master page question
- From: Nathan Sokalski
- Re: sharing master page question
- From: clintonG
- Re: sharing master page question
- From: Cirene
- Re: sharing master page question
- From: Nathan Sokalski
- sharing master page question
- Prev by Date: Re: MS word PDF conversion component
- Next by Date: Re: MS word PDF conversion component
- Previous by thread: Re: sharing master page question
- Next by thread: Re: sharing master page question
- Index(es):
Relevant Pages
|