How to

combine absolute and relative path/url

Published: 30. January 2012 | Updated: 30. January 2012
License: Microsoft Public License (MS-PL)
Categories: File system, Network
Tags: C# File System Network
Was this snippet helpful for you? YESYES / NONO
Get Analyzant!

Check your entire website from code to content in minutes with Analyzant, the free analysis suite.

Free download at
Uri baseUrl = new Uri("");
string relativeUrl = "Images/test.jpg";
Uri combined = new Uri(baseUrl, relativeUrl);

Console Output:
Send us feedback about this snippet »

Related Snippets: