AjaxHelperExtensions.ResourceLink Method (AjaxHelper, String, Object, AjaxOptions)

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 ( _
    ajax As AjaxHelper, _
    controllerName As String, _
    routeValues As Object, _
    ajaxOptions As AjaxOptions _
) As MvcHtmlString
'Usage
Dim ajax As AjaxHelper 
Dim controllerName As String 
Dim routeValues As Object 
Dim ajaxOptions As AjaxOptions 
Dim returnValue As MvcHtmlString 

returnValue = ajax.ResourceLink(controllerName, _
    routeValues, ajaxOptions)
public static MvcHtmlString ResourceLink(
    this AjaxHelper ajax,
    string controllerName,
    Object routeValues,
    AjaxOptions ajaxOptions
)
[ExtensionAttribute]
public:
static MvcHtmlString^ ResourceLink(
    AjaxHelper^ ajax, 
    String^ controllerName, 
    Object^ routeValues, 
    AjaxOptions^ ajaxOptions
)
static member ResourceLink : 
        ajax:AjaxHelper * 
        controllerName:string * 
        routeValues:Object * 
        ajaxOptions:AjaxOptions -> MvcHtmlString
public static function ResourceLink(
    ajax : AjaxHelper, 
    controllerName : String, 
    routeValues : Object, 
    ajaxOptions : AjaxOptions
) : MvcHtmlString

Parameters

  • 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 AjaxHelper. 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).

See Also

Reference

AjaxHelperExtensions Class

ResourceLink Overload

Microsoft.Web.Mvc.Resources Namespace