UrlUtility Class

Syntax

public class UrlUtility

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Internal.UrlUtility

Methods

IsLocalUrl(System.String)

Returns a value that indicates whether the URL is local. An URL with an absolute path is considered local if it does not have a host/authority part. URLs using the virtual paths (‘~/’) are also local.

Arguments:
  • url (System.String) – The URL.
Return type:

System.Boolean

Returns:

<c>true</c> if the URL is local; otherwise, <c>false</c>.

public static bool IsLocalUrl(string url)