Class VirtualPathUtility
Convenient methods to handle virtual path operations
Inheritance
System.Object
VirtualPathUtility
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public static class VirtualPathUtility : Object
Methods
Combine(String, String)
Combine two HTTP-scheme URLs or paths. Use for simple and robust concatentation of slash-separated paths, even if part of a full http: URL.
Declaration
public static string Combine(string s1, string s2)
Parameters
Type | Name | Description |
---|---|---|
System. |
s1 | First part, may include scheme, host etc |
System. |
s2 | Second part, may include traling query string, fragment etc |
Returns
Type | Description |
---|---|
System. |
The correctly combined paths regardless of if s1 ends or not, or s2 starts or not, with "/" |