This documentation is archived and is not being maintained.
Controller. TryUpdateModel( TModel ) Method (TModel )
Updates the specified model instance using values from the controller's current value provider.
Namespace:
System.Web.Mvc Assembly:
System.Web.Mvc (in System.Web.Mvc.dll)
JScript does not support generic types and methods.
Type Parameters TModel The type of the model object.
Parameters model Type: TModel The model instance to update. Return Value Type:
System. Boolean true if the update is successful; otherwise, false .Exception Condition ArgumentNullException The model parameter or the ValueProvider property is a null reference (Nothing in Visual Basic) .
You do not have to explicitly specify the generic parameter TModel . Instead, you can let the C# or Visual Basic type inference engine determine the generic parameter TModel by omitting it.