Share via


ResourceModelBinder.TryBindModel Method (ControllerContext, ModelBindingContext, ContentType, Object)

 

Returns true if the specified controller context, binding context, request format and model object can be bind to a model.

Namespace:   Microsoft.Web.Mvc.Resources
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

Syntax

public bool TryBindModel(
    ControllerContext controllerContext,
    ModelBindingContext bindingContext,
    ContentType requestFormat,
    out object model
)
public:
bool TryBindModel(
    ControllerContext^ controllerContext,
    ModelBindingContext^ bindingContext,
    ContentType^ requestFormat,
    [OutAttribute] Object^% model
)
member TryBindModel : 
        controllerContext:ControllerContext *
        bindingContext:ModelBindingContext *
        requestFormat:ContentType *
        model:Object byref -> bool
Public Function TryBindModel (
    controllerContext As ControllerContext,
    bindingContext As ModelBindingContext,
    requestFormat As ContentType,
    <OutAttribute> ByRef model As Object
) As Boolean

Parameters

Return Value

Type: System.Boolean

true if the specified controller context, binding context, request format and model object can be bind to a model; otherwise, false.

See Also

ResourceModelBinder Class
Microsoft.Web.Mvc.Resources Namespace

Return to top