HtmlHelperExtensions.ResourceLink Method (HtmlHelper, String, Object)
Generates a link to the resource controller, defaulting to the Retrieve action.
Namespace: Microsoft.Web.Mvc.Resources
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ResourceLink ( _
html As HtmlHelper, _
controllerName As String, _
routeValues As Object _
) As MvcHtmlString
'Usage
Dim html As HtmlHelper
Dim controllerName As String
Dim routeValues As Object
Dim returnValue As MvcHtmlString
returnValue = html.ResourceLink(controllerName, _
routeValues)
public static MvcHtmlString ResourceLink(
this HtmlHelper html,
string controllerName,
Object routeValues
)
[ExtensionAttribute]
public:
static MvcHtmlString^ ResourceLink(
HtmlHelper^ html,
String^ controllerName,
Object^ routeValues
)
static member ResourceLink :
html:HtmlHelper *
controllerName:string *
routeValues:Object -> MvcHtmlString
public static function ResourceLink(
html : HtmlHelper,
controllerName : String,
routeValues : Object
) : MvcHtmlString
Parameters
- html
Type: System.Web.Mvc.HtmlHelper
The html helper instance that this methods extends.
- controllerName
Type: System.String
The string controller name.
- routeValues
Type: System.Object
An 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.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type HtmlHelper. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.118) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.118).