Sage.SageContext.ExpandUrl C# (CSharp) Method

ExpandUrl() public method

Returns an absolute URL, fully expanded to a path within the current application.
/// If the argument is empty or a null. ///
public ExpandUrl ( string path ) : string
path string The path to expand
return string
        public string ExpandUrl(string path)
        {
            if (string.IsNullOrEmpty(path))
                throw new ArgumentNullException("path");

            if (path.Contains("://"))
                return path;

            return this.BaseHref.TrimEnd('/') + '/' + path.TrimStart('/');
        }