Click or drag to resize
UriExtensionsTryGetRelativePath Method
Tries to retrieve relativePath from absolute Uri. Retrieved relativePath consists of AbsolutePath without it's ApplicationPath prefix. Query string parameters are omitted.

Namespace: Kentico.OnlineMarketing.Web.Mvc
Assembly: Kentico.OnlineMarketing.Web.Mvc (in Kentico.OnlineMarketing.Web.Mvc.dll) Version: 12.0.0
Syntax
C#
public static bool TryGetRelativePath(
	this Uri uri,
	out string relativePath
)

Parameters

uri
Type: SystemUri
Uri from which to retrieve relative path.
relativePath
Type: SystemString
Retrieved relative path.

Return Value

Type: Boolean
true when relative path has been successfully retrieved, otherwise false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Uri. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also