Last post Apr 09, 2008 10:59 PM by Zhao Ji Ma - MSFT
Apr 06, 2008 09:54 PM|Pablogrind|LINK
i have a problem, this is the ubication of a image file on web application "~/SlideShow/images/Blue hills.jpg" but i need the path of the folder navigation in actually aspx,
i need convert to this path "../../SlideShow/images/Blue hills.jpg" because i have aspx in "Knowledge/APP/Default.aspx" and the image is in "SlideShow/images/Blue hills.jpg"
how convert for any ubication
sorry my english =(
Apr 07, 2008 12:45 AM|nKognito|LINK
Try to use
will give you always relative path to your sources
Apr 07, 2008 01:01 AM|Pablogrind|LINK
Thanks nKognito for reply but when i try
"C:\\Documents and Settings\\Administrador\\SampleWebSite\\SlideShow\\images\\Blue hills.jpg"
And i need the path according to the actually ubication of aspx in this form "../../SlideShow/images/Blue hills.jpg"
To accede from this ubication of aspx to the ubication of the image
Apr 09, 2008 10:59 PM|Zhao Ji Ma - MSFT|LINK
If you means relative path from ASP.NET Web Forms to the image, just Drag And Drop the image from Solution Explorer to the Design View of the page in Visual Studio/Visual Web Developer. Visual Studio/Visual Web Developer will generate the relative path for
you. For example, this is what I get after Drag & Drop of sample.jpg file.
<img src="../../folder1/subfolder1/sample.jpg" />