Controller.TryUpdateModel(TModel) Method (TModel, String)
Updates the specified model instance using values from the controller's current value provider and a prefix.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Type Parameters
- TModel
The type of the model object.
Parameters
- model
- Type: TModel
The model instance to update.
- prefix
- Type: System.String
The prefix to use when looking up values in the value provider.
| Exception | Condition |
|---|---|
| ArgumentNullException | The model parameter or the ValueProvider property is a null reference (Nothing in Visual Basic). |
Show: