Can anyone help me in resolving this issue. Relative paths make use of two special symbols, a dot (.) 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. 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. Relative file paths give us a way to travel in both directions. 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). Thanks in advance. and a double-dot (..), which translate into the current directory and the parent directory. In this option, the complete URL of the image is specified in the src attribute of HTML img tag. system closed October 8, 2014, 12:46am thanks and regards judes benance bk Reply; Deeshal Participant. Let us see some of them listed below: A … Two options to specify a source. After replacing $(this).attr("href") with this.getAttribute("href", 2) I get the same result. 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. Prefix the URL with a forward slash to denote the root: Capture So now working, thanks all! You may use absolute or relative paths to specify the source of the image in HTML img src attribute.. If I output the attribute, IE still shows the absolute path. A relative path refers to a location that is relative to a current directory. Is there any other way to configure the relative path and reading the location in .cs file. TopicClassification: FrequentlyAskedQuestion: Subject : Browser, Editing, Security, Usage : Topic Summary : Information on how to enter and use file system paths in html links. Re: Configure relative path in app.config file. Friday, August 20, 2010 8:09 PM. 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. Now whenever I place my code in another location I need to change all the image paths. 1251 Points. 416 Posts. 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. For example: 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; How to give a relative path irrespective of code location or pls suggest any better solution for this kind of requirement. 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. 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 … Relative path links are used when the images or the resources are within the same directory of the site. The absolute path. Double dots are used for moving up in the hierarchy.