Path.Combine for Urls?
Posted
by Brian MacKay
on Stack Overflow
See other posts from Stack Overflow
or by Brian MacKay
Published on 2008-12-16T21:42:26Z
Indexed on
2010/03/28
0:23 UTC
Read the original article
Hit count: 762
Path.Combine is handy, is there a similiar function in the framework for Urls?
I'm looking for syntax like this:
Url.Combine("Http://MyUrl.com/", "/Images/Image.jpg")
...Which would return: "Http://MyUrl.com/Images/Image.jpg"
...Of course string concatenation would be fine here since the '//' would be handled intelligently by the browser. But it feels a little less elegant.
© Stack Overflow or respective owner