對于指定的鏈接文本、操作、控制器、協議、主機名、URL 片段、作為路由值字典的路由值和作為字典的 HTML 屬性,返回一個定位點元素, (元素) 。
public static System.Web.Mvc.MvcHtmlString ActionLink (this System.Web.Mvc.HtmlHelper htmlHelper, string linkText, string actionName, string controllerName, string protocol, string hostName, string fragment, System.Web.Routing.RouteValueDictionary routeValues, System.Collections.Generic.IDictionary htmlAttributes);
static member ActionLink : System.Web.Mvc.HtmlHelper * string * string * string * string * string * string * System.Web.Routing.RouteValueDictionary * System.Collections.Generic.IDictionary -> System.Web.Mvc.MvcHtmlString
Public Function ActionLink (htmlHelper As HtmlHelper, linkText As String, actionName As String, controllerName As String, protocol As String, hostName As String, fragment As String, routeValues As RouteValueDictionary, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString
參數
htmlHelper
此方法擴展的 HTML 幫助器實例。
linkText
定位點元素的內部文本。
actionName
操作的名稱。
controllerName
控制器的名稱。
protocol
URL 協議,如“http”或“https”。
hostName
URL 的主機名。
fragment
URL 片段名稱(定位點名稱)。
一個包含路由參數的對象。
一個對象,該對象包含要為元素設置的 HTML 特性。
返回
一個定位點元素(a 元素)。
例外
linkText參數為 null 或為空。
適用于