Combines a base path and a relative path, but works in a non ASP.NET-hosted environment, and assumes that the relative path is relative - even if it begins with a slash.

Namespace:  EPiServer.Web
Assembly:  EPiServer.Framework (in EPiServer.Framework.dll) Version: 6.0.318.113

Syntax

C#
public static string Combine(
	string basePath,
	string relativePath
)
Visual Basic (Declaration)
Public Shared Function Combine ( _
	basePath As String, _
	relativePath As String _
) As String
Visual C++
public:
static String^ Combine(
	String^ basePath, 
	String^ relativePath
)

Parameters

basePath
Type: System..::.String
The base path.
relativePath
Type: System..::.String
The relative path.

Return Value

The combined basePath and relativePath.

Remarks

Extends to make it work in a non ASP.NET-hosted environment. Also allows all combos of trailing slash on basePath and leading on relativePath (i.e. will treat a 'faulty' relative path starting with a slash as a relative anyway. This is formally incorrect, but pragmatically useful due to other EPiServer API:s that for historical reasons work with such 'rooted' paths.

See Also