UserControl.TryUpdateModel<'TModel> Method ('TModel)
.NET Framework (current version)
Attempts to update the model instance by using the values from the data-bound control.
Assembly: System.Web (in System.Web.dll)
abstract TryUpdateModel<'TModel when 'TModel : not struct> : model:'TModel -> bool override TryUpdateModel<'TModel when 'TModel : not struct> : model:'TModel -> bool
Parameters
- model
-
Type:
TModel
The model instance to update.
Return Value
Type: System.Booleantrue if the model instance was updated successfully; otherwise, false.
Type Parameters
- TModel
The type of the model object.
The TryUpdateModel<'TModel> method must be invoked from inside a data-operation method of the control by using the ModelType property for data binding.
.NET Framework
Available since 4.5
Available since 4.5
Show: