Search Results for

    Show / Hide Table of Contents

    Class VirtualPathUtility

    Utility methods for virtual paths

    Inheritance
    System.Object
    VirtualPathUtility
    Namespace: ImageVault.Common.Lib.Web
    Assembly: ImageVault.Common.dll
    Syntax
    public static class VirtualPathUtility : Object

    Methods

    AppendTrailingSlash(String)

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

    Declaration
    public static string AppendTrailingSlash(string path)
    Parameters
    Type Name Description
    System.String path

    If null or empty, no slash is appended

    Returns
    Type Description
    System.String

    The modified path or url

    RemoveTrailingSlash(String)

    Removes a trailing slash mark (/) from a virtual path or url

    Declaration
    public static string RemoveTrailingSlash(string path)
    Parameters
    Type Name Description
    System.String path

    The virtual path/url to remove trailing slash from. If supplying the root directory "/", this will not be

    Returns
    Type Description
    System.String

    A virtual path without a trailing slash mark, if the virtual path is not already the root directory ("/") ; otherwize, null.

    In This Article
    Back to top (c) Meriworks 2002-2022