Page.TryUpdateModel<'TModel> Method ('TModel, IValueProvider)

.NET Framework (current version)
 

Updates the model instance using values from the specified value provider.

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

abstract TryUpdateModel<'TModel when 'TModel : not struct> : 
        model:'TModel *
        valueProvider:IValueProvider -> bool
override TryUpdateModel<'TModel when 'TModel : not struct> : 
        model:'TModel *
        valueProvider:IValueProvider -> bool

Parameters

model
Type: TModel

The model.

valueProvider
Type: System.Web.ModelBinding.IValueProvider

The value provider.

Return Value

Type: System.Boolean

true if model binding is successful; otherwise, false.

Type Parameters

TModel

The type of the model.

For a tutorial series on using model binding with Web Forms, see Model Binding and Web Forms.

.NET Framework
Available since 4.5
Return to top
Show: