Controller.TryUpdateModel(Of 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)

'Declaration
Protected Friend Function TryUpdateModel(Of TModel As Class) ( _
	model As TModel, _
	includeProperties As String() _
) As Boolean
'Usage
Dim model As TModel
Dim includeProperties As String()
Dim returnValue As Boolean 

returnValue = Me.TryUpdateModel(model, _
	includeProperties)

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: