อ่านในภาษาอังกฤษ

แชร์ผ่าน


UrlHelperBase.Action(UrlActionContext) Method

Definition

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-null. See the remarks section for important security information.

C#
public abstract string Action (Microsoft.AspNetCore.Mvc.Routing.UrlActionContext actionContext);
C#
public abstract string? Action (Microsoft.AspNetCore.Mvc.Routing.UrlActionContext actionContext);

Parameters

actionContext
UrlActionContext

The context object for the generated URLs for an action method.

Returns

The generated URL.

Implements

Applies to

ผลิตภัณฑ์ เวอร์ชัน
ASP.NET Core 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0