patrick24601 Posted July 6, 2005 Posted July 6, 2005 Does anybody have a clean way to manage relative links in an application that has various levels of directories? I'd like to .... 1. Keep all of the my images in applicationroot/images and be able to get to them easily no matter how deep I am in the application (deep meaning directory level). 2. Keep my application code in different applicationroot/modules/modulename directories and be able to navigate easily between them. Quote
patrick24601 Posted July 6, 2005 Author Posted July 6, 2005 Thanks for the response... albeit short ;) That does not work for example if I am on page directory/herethere.aspx and it has a link to /directory/herethere.aspx. What you get is the application trying to go to /directory/directory/herethere.aspx. The "/" is usually relative to the directory the current page is in if I am not mistaken. One of the things I am testing right now is "~/directory/herethere.aspx" Quote
kahlua001 Posted July 6, 2005 Posted July 6, 2005 "/" takes you up to the web site or virtual directory root. so if you are in "directory/page.aspx" and you link to yourself, then your link should be "page.aspx" or "/directory/page.aspx" Quote
rangerstud620 Posted July 7, 2005 Posted July 7, 2005 I had the same problem and wound up using "../" to move up a level. In your case I believe it should be "../herethere.aspx" Quote
PROKA Posted July 7, 2005 Posted July 7, 2005 "/" takes you up to the web site or virtual directory root. Doesn't work for me :o Quote Development & Research Department @ Elven Soft
bri189a Posted July 7, 2005 Posted July 7, 2005 use: "~/applicationroot/images/etc.jpg" The '~' takes you to root application regardless of the name. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.