The URLHelper type exposes the following members.
Back to Top
Back to Top
Back to Top
Back to Top
Back to Top
Back to Top
Constructors
Name | Description | |
---|---|---|
![]() | URLHelper |
Methods
Name | Description | |
---|---|---|
![]() ![]() | AddHTTPToUrl |
Adds HTTP protocol to URL if it's not contain HTTP or HTTPS.
|
![]() ![]() | AddParameterToUrl |
Adds parameter to specified URL.
|
![]() ![]() | AddPrefixToUrl |
Add URL prefix to the url.
|
![]() ![]() | AddUrlParameter |
Add parameter to query string, queryStringValue MUST start with "?".
|
![]() ![]() | AppendQuery |
Appends the given query string to the URL. If the URL already contains query string, merges both.
|
![]() ![]() | ClientRedirect |
Performs client redirect.
|
![]() ![]() | CombinePath |
Resolves given path to be absolute (combines with given paths).
|
![]() ![]() | ContainsProtocol |
Returns true if the URL contains the protocol part.
|
![]() ![]() | CorrectDomainName |
Removes white characters from the beginning and end. Also removes protocol declarations and 'www.' string from begin.
|
![]() ![]() | DomainMatch |
Returns true if the given domain names match.
|
![]() ![]() | EncodeQueryString | Obsolete.
Encodes QueryString part of URL with HTML encode.
|
![]() ![]() | EnsureHashToQueryParameters |
Replaces {hash} macro by hash code for given query string parameters.
|
![]() ![]() | EnsureURLPrefix(String, String, String) |
Ensures that the given URLs has the given prefix
|
![]() ![]() | EnsureURLPrefix(String, String, String, URLHelper PathModifierHandler) |
Ensures that the given URLs has the given prefix
|
![]() | ![]() | (Inherited from ![]() |
![]() ![]() | EscapeSpecialCharacters |
Ensures URL without forbidden characters (%, &, #).
|
![]() | ![]() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from ![]() |
![]() ![]() | ForbiddenCharactersReplacement |
Returns string containing replacement for forbidden characters (chars that can't be used in node alias and in the file system).
|
![]() ![]() | ForbiddenURLCharacters |
Returns string containing all forbidden characters that cannot be used in node alias and in the file system.
|
![]() ![]() | GetAbsoluteUrl(String) |
Returns the absolute URL (including port) representation for the given relative URL, uses current domain and application path.
|
![]() ![]() | GetAbsoluteUrl(String, String) |
Returns the absolute URL (including port) representation for the given relative URL, uses given domain and application path.
|
![]() ![]() | GetAbsoluteUrl(String, String, String, String) |
Returns the absolute URL for the given relative URL based on the given paths.
|
![]() ![]() | GetAbsoluteUrlWithPort | Obsolete.
Returns the absolute URL (including port) representation for the given relative URL, uses current domain and application path.
|
![]() ![]() | GetAllowedURLCharacters |
Returns regular expression for allowed URL characters.
|
![]() ![]() | GetApplicationUrl |
Returns current application URL (absolute), without trailing slashes.
|
![]() ![]() | GetApplicationUrl(String) |
Returns the application URL (absolute), without trailing slashes.
|
![]() ![]() | GetAppRelativePath |
Returns the relative path for specified URL.
|
![]() ![]() | GetCaseRedirectEnum |
Gets the settings for the URL case rules.
|
![]() ![]() | GetDomain |
Returns domain with port if present if from specific URL.
|
![]() ![]() | GetDomainName |
Returns name (e.g. localhost) without port, www. prefix and application path.
|
![]() ![]() | GetFriendlyExtension |
Returns first of the friendly extensions from settings.
|
![]() ![]() | GetFriendlyExtensions |
Returns string with all friendly URL extensions separated by semicolon.
|
![]() ![]() | GetFullApplicationUrl |
Returns current application URL (absolute) with port, without trailing slashes.
|
![]() ![]() | GetFullApplicationUrl(String) |
Returns current application URL (absolute) with port, without trailing slashes.
|
![]() ![]() | GetHandledUrl |
Returns the URL handled by handler404 page.
|
![]() | ![]() | Serves as a hash function for a particular type. (Inherited from ![]() |
![]() ![]() | GetIPv4Address |
Returns equivalent IPv4 address for IPv6 address specified by parameter
|
![]() ![]() | GetPhysicalPath |
Returns the physical file path that corresponds to the specified virtual path on the web server.
|
![]() ![]() | GetProtocol |
Returns protocol from url.
e.g. http, https, ftp, ...
If no protocol found, null is returned.
|
![]() ![]() | GetQuery |
Gets the query from URL.
|
![]() ![]() | GetQueryValue(String, String) |
Gets the query string value for specified key name.
|
![]() ![]() | GetQueryValue(String, String, Boolean ) |
Gets the query string value for specified key name.
|
![]() ![]() | GetSafeFileName(String, String) |
Returns the safe equivalent to the given file name (with extension).
|
![]() ![]() | GetSafeFileName(String, String, Boolean) |
Returns the safe equivalent to the given file name.
|
![]() ![]() | GetSafeUrlPart |
Returns the safe part of URL. This method doesn't proceed complete URL it handles only part of URL.
|
![]() | ![]() | Gets the (Inherited from ![]() ![]() |
![]() ![]() | GetUrlExtension |
Gets the extension for the given URL. Returns the extension with the dot, e.g. ".gif"
|
![]() ![]() | GetUrlParameter |
Returns value of query parameter from URL.
|
![]() ![]() | GetVirtualPath |
Converts the absolute path to the virtual.
|
![]() ![]() | CheckPrefix |
Checks the URL prefix. If the prefix is present, returns true and removes the prefix from the URL if removePrefix is true.
|
![]() ![]() | CheckPrefixes |
Checks the URL prefixes. If one of the the prefixes is present, returns true and removes the prefix from the URL if removePrefix is true.
|
![]() ![]() | IsAnchor |
Returns true for url's starting with hash (#) character.
|
![]() ![]() | IsExcluded(String, String) |
Checks if page with specified relative path is excluded from excluded paths.
|
![]() ![]() | IsExcluded(String, String ) |
Checks if page with specified relative path is excluded from excluded paths.
|
![]() ![]() | IsExcludedCustom |
Checks if page with specified relative path is excluded from excluded paths.
|
![]() ![]() | IsExcludedSystem |
Checks if page with specified relative path is excluded from system paths.
|
![]() ![]() | IsExcludedSystemEnum(String) |
Checks if page with specified relative path is excluded from system paths and returns the category of the excluded page.
|
![]() ![]() | IsExcludedSystemEnum(String, Boolean) |
Checks if page with specified relative path is excluded from system paths and returns the category of the excluded page.
|
![]() ![]() | IsHandler |
Checks if page is error handler.
|
![]() ![]() | IsPostback |
Returns true if current request is post-back.
|
![]() ![]() | IsSystemPath |
Returns true if the given path is a system path. The path is expected to be lowercase and start with slash, e.g. "/cmsmodules/..."
|
![]() ![]() | IsTldDomain |
Returns true if domain is IP address or top level domain e.g localhost
|
![]() ![]() | LimitURLReplacements |
Limits multiple replacements, starting and trailing replacements from URL. Can be disabled by app key: CMSLimitUrlReplacement.
|
![]() ![]() | MakeLinksAbsolute(String) |
Returns the absolute representation of the HTML links (image paths ...).
|
![]() | MakeLinksAbsolute(String, String) |
Returns the absolute representation of the HTML links (image paths ...).
|
![]() | ![]() | Creates a shallow copy of the current (Inherited from ![]() ![]() |
![]() ![]() | MergeQueryStrings |
Merges two query strings. Query string parameters should (but don't have to) start with question mark
but they definitely must omit path part of URL.
|
![]() ![]() | PermanentRedirect | Obsolete.
Redirects the response using specified URL using permanent redirection using 301.
|
![]() ![]() | PropagateUrlParameters |
Propagates the URL parameters from current URL to the given URL
|
![]() ![]() | Redirect(String) |
Redirects the response using specified URL (302 HTTP status code).
|
![]() ![]() | Redirect(String, Boolean, String) | Obsolete.
Redirects the response using specified URL.
|
![]() ![]() | RedirectPermanent |
Redirects the response using specified URL using permanent redirection using 301.
|
![]() ![]() | RefreshCurrentPage |
Refreshes the current page by doing a redirect to self
|
![]() ![]() | RemoveApplicationPath |
Removes the Application path from the URL.
|
![]() ![]() | RemoveEmptyQueryParameters |
Removes empty query parameters. (eg. '?param=' -> '')
|
![]() ![]() | RemoveExtension |
Removes the potential extension from the given path.
|
![]() ![]() | RemoveFirstPart |
Returns the string with first selector removed.
|
![]() ![]() | RemoveParameterFromUrl |
Removes specified parameters from the given URL.
|
![]() ![]() | RemoveParametersFromUrl |
Removes specified parameters from the given URL.
|
![]() ![]() | RemovePathInfo |
Removes the path info from URL.
|
![]() ![]() | RemovePort |
Removes the port part from the domain name.
|
![]() ![]() | RemovePortFromURL |
Removes the port part from the whole URL.
|
![]() ![]() | RemoveProtocol |
Removes the protocol part from the URL.
|
![]() ![]() | RemoveProtocolAndDomain |
Removes the protocol and domain part from the URL.
|
![]() ![]() | RemoveQuery |
Removes the query from URL.
|
![]() ![]() | RemoveTrailingSlashFromURL |
Removes trailing slash from URL.
|
![]() ![]() | RemoveUrlParameter |
Remove parameter from query string.
|
![]() ![]() | RemoveUrlParameters |
Removes the given URL parameters
|
![]() ![]() | RemoveWWW |
Trim www if input text starts with it.
|
![]() ![]() | ResolveClientUrl |
Resolves a client relative URL to the absolute form.
|
![]() ![]() | ResolveUrl |
Resolves an application relative URL to the absolute form.
|
![]() ![]() | ResponseRedirect |
Redirects the response using specified URL using standard redirection with Response.Redirect.
|
![]() ![]() | SeeOther |
Redirects the client to another URL using the GET method (303 H).
|
![]() | ![]() | Returns a string that represents the current object. (Inherited from ![]() |
![]() ![]() | UnMapPath |
Converts the physical file path to virtual path within the web application.
|
![]() ![]() | UnResolveUrl |
Un-resolves the given URL (replaces application path with ~).
|
![]() ![]() | UpdateParameterInUrl |
Update parameter in specified URL.
|
![]() ![]() | URLDecode |
URL decoding function.
|
![]() ![]() | URLEncode |
URL encoding function.
|
![]() ![]() | UrlEncodeQueryString |
URL encodes query string in given URL. Needs HttpContext.
|
![]() ![]() | UseLangPrefixForUrls |
Returns value that indicates whether lang prefix should be used for specified site.
|
![]() ![]() | UsePermanentRedirect |
If true, permanent redirection (301) is used instead of regular (302) redirection.
|
![]() ![]() | UseURLsWithTrailingSlash |
Gets the settings for the URL trailing slash rules.
|
Extension Methods
Name | Description | |
---|---|---|
![]() | AsValue |
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.) |
![]() | GetAPIString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) |
![]() | GetString |
Gets the string by the specified resource key
(Defined by CoreExtensions.) |
![]() | ToBoolean |
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.) |
![]() | ToDateTime |
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.) |
![]() | ToDouble |
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.) |
![]() | ToGuid |
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.) |
![]() | ToInteger |
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.) |
![]() | ToString |
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.) |
Fields
Name | Description | |
---|---|---|
![]() ![]() | SYSTEM_QUERY_PARAMETER |
Used in system requests of live site pages, it prevents the system to log statistics or activities, e.g. when dynamic newsletter is generated.
|
Properties
Name | Description | |
---|---|---|
![]() ![]() | AliasPathParameterName |
Alias path query parameter name.
|
![]() ![]() | AllowedURLPathValues |
Returns string containing allowed characters that cant be used in URL path.
|
![]() ![]() | CustomTheme |
Custom theme name.
|
![]() ![]() | DefaultTheme |
Default theme name.
|
![]() ![]() | ImagesDirectory |
Resolved base directory for the images.
|
![]() ![]() | LanguageParameterName |
Language query parameter name.
|
![]() ![]() | PortalTemplatePage |
Page used as the portal template base page
|
![]() ![]() | RegExMakeLinksAbsolute |
Make links absolute regular expression.
|
![]() ![]() | SSLUrlPort |
Application's SSL URL port.
|
![]() ![]() | UrlPort |
Application's URL port.
|
![]() ![]() | UseTrailingSlashOnlyForExtensionLess |
Gets the value that indicates whether trailing slash handling
should be processed for all requests or only for extension less requests
|
Events
Name | Description | |
---|---|---|
![]() ![]() | OnBeforeGetSafeUrlPath |
Occurs when the GetSafeUtlPath method is called, returns false if original method should not be used.
|
See Also