UrlHelper Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An implementation of IUrlHelper that contains methods to build URLs for ASP.NET MVC within an application.
public ref class UrlHelper : Microsoft::AspNetCore::Mvc::IUrlHelper
public ref class UrlHelper : Microsoft::AspNetCore::Mvc::Routing::UrlHelperBase
public class UrlHelper : Microsoft.AspNetCore.Mvc.IUrlHelper
public class UrlHelper : Microsoft.AspNetCore.Mvc.Routing.UrlHelperBase
type UrlHelper = class
interface IUrlHelper
type UrlHelper = class
inherit UrlHelperBase
Public Class UrlHelper
Implements IUrlHelper
Public Class UrlHelper
Inherits UrlHelperBase
- Inheritance
-
UrlHelper
- Inheritance
- Implements
Constructors
UrlHelper(ActionContext) |
Initializes a new instance of the UrlHelper class using the specified
|
Properties
ActionContext |
Gets the ActionContext for the current request. |
ActionContext |
Gets the ActionContext for the current request. (Inherited from UrlHelperBase) |
AmbientValues |
Gets the RouteValueDictionary associated with the current request. |
AmbientValues |
Gets the RouteValueDictionary associated with the current request. (Inherited from UrlHelperBase) |
HttpContext |
Gets the HttpContext associated with the current request. |
Router |
Gets the top-level IRouter associated with the current request. Generally an IRouteCollection implementation. |
Methods
Action(UrlActionContext) |
Generates a URL with an absolute path for an action method, which contains the action
name, controller name, route values, protocol to use, host name, and fragment specified by
UrlActionContext. Generates an absolute URL if Protocol and
Host are non- |
Content(String) |
Converts a virtual (relative, starting with ~/) path to an application absolute path. |
Content(String) |
Converts a virtual (relative, starting with ~/) path to an application absolute path. (Inherited from UrlHelperBase) |
GenerateUrl(String, String, String, String) |
Generate a url using the specified values. (Inherited from UrlHelperBase) |
GenerateUrl(String, String, String) |
Generates a URI from the provided components. (Inherited from UrlHelperBase) |
GenerateUrl(String, String, VirtualPathData, String) |
Generates the URL using the specified components. |
GetValuesDictionary(Object) |
Gets a RouteValueDictionary using the specified values. (Inherited from UrlHelperBase) |
GetVirtualPathData(String, RouteValueDictionary) |
Gets the VirtualPathData for the specified |
IsLocalUrl(String) |
Returns a value that indicates whether the URL is local. A URL is considered local if it does not have a host / authority part and it has an absolute path. URLs using virtual paths ('~/') are also local. |
IsLocalUrl(String) |
Returns a value that indicates whether the URL is local. A URL is considered local if it does not have a host / authority part and it has an absolute path. URLs using virtual paths ('~/') are also local. (Inherited from UrlHelperBase) |
Link(String, Object) |
Generates an absolute URL for the specified |
Link(String, Object) |
Generates an absolute URL for the specified |
RouteUrl(UrlRouteContext) |
Generates a URL with an absolute path, which contains the route name, route values, protocol to use, host
name, and fragment specified by UrlRouteContext. Generates an absolute URL if
Protocol and Host are non- |
Extension Methods
Action(IUrlHelper, String, Object) |
Generates a URL with a path for an action method, which contains the specified
|
Action(IUrlHelper, String, String, Object, String, String, String) |
Generates a URL with a path for an action method, which contains the specified
|
Action(IUrlHelper, String, String, Object, String, String) |
Generates a URL with a path for an action method, which contains the specified
|
Action(IUrlHelper, String, String, Object, String) |
Generates a URL with a path for an action method, which contains the specified
|
Action(IUrlHelper, String, String, Object) |
Generates a URL with a path for an action method, which contains the specified
|
Action(IUrlHelper, String, String) |
Generates a URL with a path for an action method, which contains the specified
|
Action(IUrlHelper, String) |
Generates a URL with a path for an action method, which contains the specified
|
Action(IUrlHelper) |
Generates a URL with a path for an action method. |
ActionLink(IUrlHelper, String, String, Object, String, String, String) |
Generates an absolute URL for an action method, which contains the specified
|
Page(IUrlHelper, String, Object) |
Generates a URL with a relative path for the specified |
Page(IUrlHelper, String, String, Object, String, String, String) |
Generates a URL with an absolute path for the specified |
Page(IUrlHelper, String, String, Object, String, String) |
Generates a URL with an absolute path for the specified |
Page(IUrlHelper, String, String, Object, String) |
Generates a URL with an absolute path for the specified |
Page(IUrlHelper, String, String, Object) |
Generates a URL with a relative path for the specified |
Page(IUrlHelper, String, String) |
Generates a URL with a relative path for the specified |
Page(IUrlHelper, String) |
Generates a URL with a relative path for the specified |
PageLink(IUrlHelper, String, String, Object, String, String, String) |
Generates an absolute URL for a page, which contains the specified
|
RouteUrl(IUrlHelper, Object) |
Generates a URL with an absolute path for the specified route |
RouteUrl(IUrlHelper, String, Object, String, String, String) |
Generates a URL with an absolute path for the specified route |
RouteUrl(IUrlHelper, String, Object, String, String) |
Generates a URL with an absolute path for the specified route |
RouteUrl(IUrlHelper, String, Object, String) |
Generates a URL with an absolute path for the specified route |
RouteUrl(IUrlHelper, String, Object) |
Generates a URL with an absolute path for the specified |
RouteUrl(IUrlHelper, String) |
Generates a URL with an absolute path for the specified |