473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

how to merge urls with relative paths?

Hi

Does anyone know how to combine a url with a relative path (ex.:
"../imges/pic.png") with an absolute path (ex.:
www.someplace.org/themeOnePointZero) ?

Thanks....

../ask
Nov 17 '05 #1
1 7616
ask josephsen,

I would use the Uri class. Create a new instance of the Uri class with
the absolute url (www.someplace.org/themeOnePointZero), and the call the
static Create method, passing the Uri instance created before, along with
the relative Uri ("../imges/pic.png").

It will give you a new Uri instance which has the combined Uri.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ask josephsen" <jaj(((a)))oticon.dk> wrote in message
news:42*********************@news.dk.uu.net...
Hi

Does anyone know how to combine a url with a relative path (ex.:
"../imges/pic.png") with an absolute path (ex.:
www.someplace.org/themeOnePointZero) ?

Thanks....

./ask

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Doug | last post by:
If I were to write an include with a relative path like include("../conf/config.php"); What is the use? As far as I understand it, the path is relative to the first script that is called by...
1
by: Stefan Seefeld | last post by:
hi there, I'm generating a set of html pages that refer to each other via relative URLs. However, during the generation of these files I only deal with paths (as generated by the os.path...
5
by: jason | last post by:
Can anyone help me find a solution to quickly working out relative paths to a folder in the root of my server... Although it easy when you go - say - two levels down: .../includes it...
3
by: Patrick Coleman | last post by:
Hi, I'm looking for a function to split urls into their component parts, ie protocol, host, path, filename, extension. I'm really only looking for path and hostname (so I can download a webpage...
21
by: AES/newspost | last post by:
My understanding -- I'm not an expert -- is that on (some? many? all?) standard Internet servers a URL can point to a subdirectory name followed by a backslash, and that links to this URL will...
2
by: Joe | last post by:
Hi, can someone tell me how to set up relativ paths in VS2003 C++ ? I have some source with a tree directory structure that segments include files in various directories: #include...
2
by: abcd | last post by:
I am using https protocol and some of my pages are using relatie paths to our images folder and gif files... when the page is rendered the images are not rendered.....is there anything wrong...
10
by: tom | last post by:
hi group, i desperately need a function that will transform relative URLs to absolute URLs in the SRC part of <img> tags. ie: function makeAbsolute($html,$basehref) { //if regex match =...
15
by: Lars Eighner | last post by:
Aside from the deaths of a few extra electrons to spell out the whole root relative path, is there any down side? It seems to me that theoretically it shouldn't make any difference, and it would...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.