System.Web.VirtualPathUtility.Combine Method

Combines a base path and a relative path.

Syntax

public static string Combine (string basePath, string relativePath)

Parameters

basePath
The base path.
relativePath
The relative path.

Returns

The combined basePath and relativePath.

Remarks

The VirtualPathUtility.Combine(string, string) method returns the value of the HttpRuntime.AppDomainAppVirtualPath property if the relative path is exactly a tilde (~).

The VirtualPathUtility.Combine(string, string) method uses the HttpRuntime.AppDomainAppVirtualPath property value rather than the base path, if the relative path starts with a tilde and a slash mark (~/); otherwise, the VirtualPathUtility.Combine(string, string) method uses the base path.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0