UserControl.UpdateModel<TModel> Method (TModel, IValueProvider)

.NET Framework (current version)
 

Updates the specified model instance using values from the value provider of the user control.

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

public virtual void UpdateModel<TModel>(
	TModel model,
	IValueProvider valueProvider
)
where TModel : class

Parameters

model
Type: TModel

The model instance to update.

valueProvider
Type: System.Web.ModelBinding.IValueProvider

A dictionary of values to use to update the model.

Type Parameters

TModel

The type of the model object.

Exception Condition
InvalidOperationException

The model instance was not updated successfully.

.NET Framework
Available since 4.5
Return to top
Show: