Edit

Share via


UserControl.UpdateModel Method

Definition

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

Overloads

UpdateModel<TModel>(TModel)

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

UpdateModel<TModel>(TModel, IValueProvider)

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

UpdateModel<TModel>(TModel)

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

public:
generic <typename TModel>
 where TModel : class virtual void UpdateModel(TModel model);
public virtual void UpdateModel<TModel> (TModel model) where TModel : class;
abstract member UpdateModel : 'Model -> unit (requires 'Model : null)
override this.UpdateModel : 'Model -> unit (requires 'Model : null)
Public Overridable Sub UpdateModel(Of TModel As Class) (model As TModel)

Type Parameters

TModel

The type of the model object.

Parameters

model
TModel

The model instance to update.

Exceptions

The model instance was not updated successfully.

Applies to

UpdateModel<TModel>(TModel, IValueProvider)

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

public:
generic <typename TModel>
 where TModel : class virtual void UpdateModel(TModel model, System::Web::ModelBinding::IValueProvider ^ valueProvider);
public virtual void UpdateModel<TModel> (TModel model, System.Web.ModelBinding.IValueProvider valueProvider) where TModel : class;
abstract member UpdateModel : 'Model * System.Web.ModelBinding.IValueProvider -> unit (requires 'Model : null)
override this.UpdateModel : 'Model * System.Web.ModelBinding.IValueProvider -> unit (requires 'Model : null)
Public Overridable Sub UpdateModel(Of TModel As Class) (model As TModel, valueProvider As IValueProvider)

Type Parameters

TModel

The type of the model object.

Parameters

model
TModel

The model instance to update.

valueProvider
IValueProvider

A dictionary of values to use to update the model.

Exceptions

The model instance was not updated successfully.

Applies to