AppendTrailingSlash Method

VirtualPathUtility.AppendTrailingSlash Method (String)

 

Appends the literal slash mark (/) to the end of the virtual path, if one does not already exist.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

public static string AppendTrailingSlash(
	string virtualPath
)

Parameters

virtualPath
Type: System.String

The virtual path to append the slash mark to.

Return Value

Type: System.String

The modified virtual path.

If the literal slash mark (/) exists at the end of the virtual path, the virtual path is not modified.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft