Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Best way to use a header include file?

Reply
Thread Tools

Re: Best way to use a header include file?

 
 
Alan Silver
Guest
Posts: n/a
 
      09-27-2005
If the images are all in /images, then why bother with the ~ sign?
That's only for server controls anyway, so you have to remember to use /
in client stuff.

It would be easier to use /images for everything, as that will always
resolve to the images folder off the domain's root. No?

>> "~/images/whatever.ext" will work for any application folder.
>>
>> "~" stand for the application root in ASP.NET,
>> so if you have a directory structure like this :
>>
>> root
>> /images
>> /anotherdir
>> /anotherdir/someotherdir
>> /anotherdir/someotherdir/yetanotherdir
>>
>> "~/images/whatever.ext" will reference root/images
>> from all those directories.

>
>
>Thanks. Where is this mentioned in the help file or MSDN? I don't even know
>what keyword to use for this.
>
>John
>
>
>
>>
>>
>>
>> Juan T. Llibre, ASP.NET MVP
>> ASP.NET FAQ : http://asp.net.do/faq/
>> Foros de ASP.NET en Espaņol : http://asp.net.do/foros/
>> ======================================
>> "John Dalberg" <(E-Mail Removed)2> wrote in message
>> news:1pmdxncbz8pf9$(E-Mail Removed)...
>>>
>>>
>>> I created a header file to be included in every webpage. The header file
>>> has images that have a path to an "images" folder off the root folder.
>>> However if I use this header file for web pages that reside in subfolders,
>>> I have to change the path of all the image links to '../images/' instead of
>>> 'images/'.
>>>
>>> What's the best way to have a single header file which *any* web page,
>>> regardless of its location, can use without modifying it to suit certain
>>> webpages depedning on their location?
>>>
>>> --
>>> John Dalberg


--
Alan Silver
(anything added below this line is nothing to do with me)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
Best way to use a header include file? John Dalberg HTML 2 09-20-2005 07:59 AM
#include headers that include this header Aguilar, James C++ 2 07-16-2004 05:56 PM
Re: the use of #include <a_file.h> v/s #include"a_file.cpp" Rolf Magnus C++ 2 11-28-2003 12:26 PM



Advertisments