Share via


IModelBinderProvider.GetBinder Method

Returns the model binder for the specified type.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Function GetBinder ( _
    modelType As Type _
) As IModelBinder
'Usage
Dim instance As IModelBinderProvider
Dim modelType As Type
Dim returnValue As IModelBinder

returnValue = instance.GetBinder(modelType)
IModelBinder GetBinder(
    Type modelType
)
IModelBinder^ GetBinder(
    Type^ modelType
)
function GetBinder(
    modelType : Type
) : IModelBinder

Parameters

Return Value

Type: System.Web.Mvc.IModelBinder
The model binder for the specified type.

Remarks

Implementations that cannot create the requested type should return null reference (Nothing in Visual Basic). If the ASP.NET MVC framework cannot find a model binder for a type, the default model binder will be used. Use the DefaultBinder property to set the default model binder. The default model binder for the ASP.NET MVC framework is System.Web.Mvc.DefaultModelBinder. Model binder providers run in order and before static registered providers.

See Also

Reference

IModelBinderProvider Interface

System.Web.Mvc Namespace