Page.UpdateModel Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Updates the specified model instance using values from a value provider.
Overloads
UpdateModel<TModel>(TModel) |
Updates the specified model instance using values from the data-bound control. |
UpdateModel<TModel>(TModel, IValueProvider) |
Updates the specified model instance using values from a specified value provider. |
Remarks
For a tutorial series on using model binding with Web Forms, see Model Binding and Web Forms.
UpdateModel<TModel>(TModel)
Updates the specified model instance 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.
Parameters
- model
- TModel
The model.
Remarks
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.
Applies to
UpdateModel<TModel>(TModel, IValueProvider)
Updates the specified model instance using values from a specified value provider.
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.
Parameters
- model
- TModel
The model.
- valueProvider
- IValueProvider
The value provider.
Remarks
For a tutorial series on using model binding with Web Forms, see Model Binding and Web Forms.
Applies to
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示