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.MvcAssembly: Kentico.OnlineMarketing.Web.Mvc (in Kentico.OnlineMarketing.Web.Mvc.dll) Version: 13.0.131
Syntax 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, always starts with "/".
Return Value
Type:
Booleantrue 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