HtmlHelperExtensions.ResourceLink Method
Generates a link to the resource controller.
Namespace: Microsoft.Web.Mvc.Resources
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Overload List
Name | Description | |
---|---|---|
![]() ![]() |
ResourceLink(HtmlHelper, String, Object) | Generates a link to the resource controller, defaulting to the Retrieve action. |
![]() ![]() |
ResourceLink(HtmlHelper, String, String, Object) | Generates a link to the resource controller, defaulting to the Retrieve action. |
![]() ![]() |
ResourceLink(HtmlHelper, String, String, Object, ActionType) | Generates a link to the resource controller, defaulting to the Retrieve action. |
See Also
HtmlHelperExtensions Class
Microsoft.Web.Mvc.Resources Namespace
Return to top
HtmlHelperExtensions.ResourceLink Method (HtmlHelper, String, Object)
Generates a link to the resource controller, defaulting to the Retrieve action.
Syntax
public static MvcHtmlString ResourceLink(
this HtmlHelper html,
string controllerName,
object routeValues
)
public:
[ExtensionAttribute]
static MvcHtmlString^ ResourceLink(
HtmlHelper^ html,
String^ controllerName,
Object^ routeValues
)
static member ResourceLink :
html:HtmlHelper *
controllerName:string *
routeValues:Object -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function ResourceLink (
html As HtmlHelper,
controllerName As String,
routeValues As Object
) As MvcHtmlString
Parameters
html
Type: System.Web.Mvc.HtmlHelperThe html helper instance that this methods extends.
controllerName
Type: System.StringThe string controller name.
routeValues
Type: System.ObjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
Return Value
Type: System.Web.Mvc.MvcHtmlString
A link to the resource controller.
Return to top
HtmlHelperExtensions.ResourceLink Method (HtmlHelper, String, String, Object)
Generates a link to the resource controller, defaulting to the Retrieve action.
Syntax
public static MvcHtmlString ResourceLink(
this HtmlHelper html,
string controllerName,
string linkText,
object routeValues
)
public:
[ExtensionAttribute]
static MvcHtmlString^ ResourceLink(
HtmlHelper^ html,
String^ controllerName,
String^ linkText,
Object^ routeValues
)
static member ResourceLink :
html:HtmlHelper *
controllerName:string *
linkText:string *
routeValues:Object -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function ResourceLink (
html As HtmlHelper,
controllerName As String,
linkText As String,
routeValues As Object
) As MvcHtmlString
Parameters
html
Type: System.Web.Mvc.HtmlHelperThe html helper instance that this methods extends.
controllerName
Type: System.StringThe string controller name.
linkText
Type: System.StringThe link text.
routeValues
Type: System.ObjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
Return Value
Type: System.Web.Mvc.MvcHtmlString
A link to the resource controller.
Return to top
HtmlHelperExtensions.ResourceLink Method (HtmlHelper, String, String, Object, ActionType)
Generates a link to the resource controller, defaulting to the Retrieve action.
Syntax
public static MvcHtmlString ResourceLink(
this HtmlHelper html,
string controllerName,
string linkText,
object routeValues,
ActionType actionType
)
public:
[ExtensionAttribute]
static MvcHtmlString^ ResourceLink(
HtmlHelper^ html,
String^ controllerName,
String^ linkText,
Object^ routeValues,
ActionType actionType
)
static member ResourceLink :
html:HtmlHelper *
controllerName:string *
linkText:string *
routeValues:Object *
actionType:ActionType -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function ResourceLink (
html As HtmlHelper,
controllerName As String,
linkText As String,
routeValues As Object,
actionType As ActionType
) As MvcHtmlString
Parameters
html
Type: System.Web.Mvc.HtmlHelperThe html helper instance that this methods extends.
controllerName
Type: System.StringThe string controller name.
linkText
Type: System.StringThe link text.
routeValues
Type: System.ObjectAn object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax.
actionType
Type: Microsoft.Web.Mvc.Resources.ActionTypeThe action type.
Return Value
Type: System.Web.Mvc.MvcHtmlString
A link to the resource controller.
Return to top