relative-path

Relative path from an ASP.NET user control NavigateUrl

荒凉一梦 提交于 2019-12-06 10:28:08
问题 I have a user control that contains a GridView. The GridView has both a HyperLinkField column and a template column that contains a HyperLink control. The ASP.NET project is structured as follows, with the Default.aspx page in each case using the user control. Application Root Controls UserControl with GridView SystemAdminFolder Default.aspx Edit.aspx OrganisationAdminFolder Default.aspx Edit.aspx StandardUserFolder Default.aspx Edit.aspx Note: The folders are being used to ensure the user

How to set relative path to Images directory inside C# project?

こ雲淡風輕ζ 提交于 2019-12-06 10:04:34
问题 I am working on C# project i need to get the images from Images directory using relative path. I have tried var path = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\Images\logo.png"; var logoImage = new LinkedResource(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)+@"\Images\logo.png") But no luck with these... I have made the images to be copied to output directory when the program is running but it doesn't pickup those images. 回答1: If you are using

How to make xcodeproj file relative in Xcode 4.5

醉酒当歌 提交于 2019-12-06 09:27:13
问题 I was following this tutorial and stumbled across this screen shot: apparently there was a way to make the Xcode project file relative to some user defined env variable in earlier versions of Xcode (you get there by highlighting the project file then clicking cmd + i ) I couldn't find a way to this in Xcode 4.5 (the closest I could get to that was this post, but the instructions don't work on Xcode 4.5) ideas? update : I tried the idea of changing the 'header search paths' under build

Relative URL does not get resolved correctly by jQuery

戏子无情 提交于 2019-12-06 08:39:49
问题 I am building a Rails (3.0.3) application with some JavaScript using jQuery (1.4.4). On one of the sites I added a click event listener and want to load some content using a AJAX request. $(document).ready(function() { $("a#settings").click(function() { $("div#box").load("settings.js"); return false; }); }); When I now open the site "http://localhost:3000/entities/3" where the link with the bound click listener is located and click the link I get a 404 error. This happens because the AJAX

What is the difference between / and ~/ relative paths?

我的未来我决定 提交于 2019-12-06 08:31:35
I thought that both types would bring you to the root folder, but apparently, they work differently, once you do a URL rewrite. For instance, I normally use / which I know will bring you to the root folder and it does when a URL has been rewritten. When someone else tried to use ~/ after a URL has been rewritten, then the path fails to find the file. Why is that? / will take you back to the root of your website. ~/ will take you to the home folder of your application on the website. If your application is in a folder called myApp, for example, so the URL looks like this http://www.YourSite.com

Thymeleaf URL expression in .css file

依然范特西╮ 提交于 2019-12-06 07:51:26
问题 I'm using Spring MVC and the Thymeleaf view engine. I have an external style.css file with the CSS for my page. In the CSS file, I want to refer to a relative image URL. This is my style.css file: .background { width: 100%; background-image: url('/path/to/image/bg.png'); } The above tries to access an image with the following URL, which doesn't exist: http://localhost/path/to/image/bg.png My real image is at: http://localhost/myapp/path/to/image/bg.png This StackOverflow question gives the

Relative path for the Subreport

北慕城南 提交于 2019-12-06 05:07:53
问题 I'm working with iReport 3.5.0, and I'm using a subreport inside my main report. I don't want to give the absolute path for the subreport expression, but for example if I just give "bpSubReport.jasper" as the subreport expression (because sub and main are in the same directory), then iReport can find bpSubReport.jasper and compile the main report into bPReport.jasper, but my Java (gwt) application can't. It throws the exception net.sf.jasperreports.engine.JRException: Could not load object

XAMPP relative urls not working correctly

拈花ヽ惹草 提交于 2019-12-06 04:35:00
问题 on http://www.exampleSite.com/aPage.php, the following image loads correctly <img src="/images/sidenav/analysis-2.gif" /> but at http://localhost/exampleSite/aPage.php, it tries to get localhost/images/... instead of localhost/exampleSite/images/... My file structure is: C:\xampp\htdocs\exampleSite\ I have had this problem across multiple projects, and have previously resorted to absolute URLs, but now I am just trying to make some quick updates on a page, and I cannot view it correctly on my

file_get_contents( - Fix relative urls

萝らか妹 提交于 2019-12-06 04:05:12
I am trying to display a website to a user, having downloaded it using php. This is the script I am using: <?php $url = 'http://stackoverflow.com/pagecalledjohn.php'; //Download page $site = file_get_contents($url); //Fix relative URLs $site = str_replace('src="','src="' . $url,$site); $site = str_replace('url(','url(' . $url,$site); //Display to user echo $site; ?> So far this script works a treat except for a few major problems with the str_replace function. The problem comes with relative urls. If we use an image on our made up pagecalledjohn.php of a cat (Something like this: ). It is a

AngularJS: Relative link paths are broken when html5mode(true) is on

倾然丶 夕夏残阳落幕 提交于 2019-12-06 03:57:18
问题 I've been searching and I've found "solutions" to this problem, yet I still can't get this to work right. The Scenario: I'm building an Angular (version 1.2) website with the UI Router and running it on a Node server on localhost. I'm trying to make it have "pretty" url's with the $locationProvider and by turning html5(true) on. My website works fine when clicking through it, but when I try to navigate to a relative link path or refresh the link path the page breaks. I also intend to deploy