Now whenever I place my code in another location I need to change all the image paths. Two options to specify a source. If I output the attribute, IE still shows the absolute path. A … Relative file paths give us a way to travel in both directions. How to give a relative path irrespective of code location or pls suggest any better solution for this kind of requirement. Can anyone help me in resolving this issue. Re: Configure relative path in app.config file. Still today, one of the more tricky and confusing things about HTML is linking to other pages and sites, especially when absolute and relative paths … A relative path refers to a location that is relative to a current directory. system closed October 8, 2014, 12:46am Take a look at my primitive example: Here is all you need to know about relative file paths: Starting with “/” returns to the root directory and starts there; Starting with “../” moves one directory backwards and starts there; Prefix the URL with a forward slash to denote the root: Capture TopicClassification: FrequentlyAskedQuestion: Subject : Browser, Editing, Security, Usage : Topic Summary : Information on how to enter and use file system paths in html links. I am using xml file as a database resource to my small app and gave the absolute path of image urls/locations in the xml file as shown. A relative path points to the location of the file you want to link to in relation to the page being viewed, all within your server space. Double dots are used for moving up in the hierarchy. Thanks in advance. You may use absolute or relative paths to specify the source of the image in HTML img src attribute.. Is there any other way to configure the relative path and reading the location in .cs file. Also unlike absolute paths, relative path links do not require a full URL for linking, and depending on different scenarios, the syntax rule for relative path links may vary. The absolute path. It IS a relative url and I had to get rid of the first slash before ‘images’ and I had to put it in quotes. 416 Posts. 1251 Points. For example: and a double-dot (..), which translate into the current directory and the parent directory. thanks and regards judes benance bk Reply; Deeshal Participant. The OP has clearly added a folder to his projects root directory, and relative paths are specified not from the project's root directory, but from the executable's location (unless you specifically change the working directory). Let us see some of them listed below: I want to give relative path and not absolute path, but in case of master pages relative path doesnt work, if my master page is in root directory and my content pages are in sub folder relative path will not work. If the page you're linking to is in the same directory as the page being viewed, then the relative path is simply the page name. After replacing $(this).attr("href") with this.getAttribute("href", 2) I get the same result. So now working, thanks all! Relative path links are used when the images or the resources are within the same directory of the site. Relative paths make use of two special symbols, a dot (.) In this option, the complete URL of the image is specified in the src attribute of HTML img tag. Friday, August 20, 2010 8:09 PM.