Export (0) Print
Expand All

Page.TryUpdateModel<TModel> Method (TModel)

.NET Framework 4.5

Updates the specified model instance using values from the data-bound control.

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

public virtual bool TryUpdateModel<TModel>(
	TModel model
)
where TModel : class

Type Parameters

TModel

The type of the model.

Parameters

model
Type: TModel

The model.

Return Value

Type: System.Boolean
true if model binding is successful; otherwise, false.

This method should only be called from a method that is specified by a data-bound control's UpdateMethod or InsertMethod property.

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

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft