Export (0) Print
Expand All

Controller.TryUpdateModel(TModel) Method (TModel, String[])

Updates the specified model instance using values from the controller's current value provider and included properties.

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

member TryUpdateModel : 
        model:'TModel * 
        includeProperties:string[] -> bool   when 'TModel : not struct

Type Parameters

TModel

The type of the model object.

Parameters

model
Type: TModel
The model instance to update.
includeProperties
Type: System.String[]
A list of properties of the model to update.

Return Value

Type: System.Boolean
true if the update is successful; otherwise, false.
Show:
© 2014 Microsoft