DefaultModelBinder DefaultModelBinder DefaultModelBinder Class

Definition

Maps a browser request to a data object. This class provides a concrete implementation of a model binder.

public class DefaultModelBinder : System.Web.Mvc.IModelBinder
type DefaultModelBinder = class
    interface IModelBinder
Public Class DefaultModelBinder
Implements IModelBinder
Inheritance
DefaultModelBinderDefaultModelBinderDefaultModelBinder
Implements

Constructors

DefaultModelBinder() DefaultModelBinder() DefaultModelBinder()

Initializes a new instance of the DefaultModelBinder class.

Properties

Binders Binders Binders

Gets or sets the model binders for the application.

ResourceClassKey ResourceClassKey ResourceClassKey

Gets or sets the name of the resource file (class key) that contains localized string values.

Methods

BindModel(ControllerContext, ModelBindingContext) BindModel(ControllerContext, ModelBindingContext) BindModel(ControllerContext, ModelBindingContext)

Binds the model by using the specified controller context and binding context.

BindProperty(ControllerContext, ModelBindingContext, PropertyDescriptor) BindProperty(ControllerContext, ModelBindingContext, PropertyDescriptor) BindProperty(ControllerContext, ModelBindingContext, PropertyDescriptor)

Binds the specified property by using the specified controller context and binding context and the specified property descriptor.

CreateModel(ControllerContext, ModelBindingContext, Type) CreateModel(ControllerContext, ModelBindingContext, Type) CreateModel(ControllerContext, ModelBindingContext, Type)

Creates the specified model type by using the specified controller context and binding context.

CreateSubIndexName(String, Int32) CreateSubIndexName(String, Int32) CreateSubIndexName(String, Int32)

Creates an index (a subindex) based on a category of components that make up a larger index, where the specified index value is an integer.

CreateSubIndexName(String, String) CreateSubIndexName(String, String) CreateSubIndexName(String, String)

Creates an index (a subindex) based on a category of components that make up a larger index, where the specified index value is a string.

CreateSubPropertyName(String, String) CreateSubPropertyName(String, String) CreateSubPropertyName(String, String)

Creates the name of the subproperty by using the specified prefix and property name.

GetFilteredModelProperties(ControllerContext, ModelBindingContext) GetFilteredModelProperties(ControllerContext, ModelBindingContext) GetFilteredModelProperties(ControllerContext, ModelBindingContext)

Returns a set of properties that match the property filter restrictions that are established by the specified binding context.

GetModelProperties(ControllerContext, ModelBindingContext) GetModelProperties(ControllerContext, ModelBindingContext) GetModelProperties(ControllerContext, ModelBindingContext)

Returns the properties of the model by using the specified controller context and binding context.

GetPropertyValue(ControllerContext, ModelBindingContext, PropertyDescriptor, IModelBinder) GetPropertyValue(ControllerContext, ModelBindingContext, PropertyDescriptor, IModelBinder) GetPropertyValue(ControllerContext, ModelBindingContext, PropertyDescriptor, IModelBinder)

Returns the value of a property using the specified controller context, binding context, property descriptor, and property binder.

GetTypeDescriptor(ControllerContext, ModelBindingContext) GetTypeDescriptor(ControllerContext, ModelBindingContext) GetTypeDescriptor(ControllerContext, ModelBindingContext)

Returns the descriptor object for a type that is specified by its controller context and binding context.

IsModelValid(ModelBindingContext) IsModelValid(ModelBindingContext) IsModelValid(ModelBindingContext)

Determines whether a data model is valid for the specified binding context.

OnModelUpdated(ControllerContext, ModelBindingContext) OnModelUpdated(ControllerContext, ModelBindingContext) OnModelUpdated(ControllerContext, ModelBindingContext)

Called when the model is updated.

OnModelUpdating(ControllerContext, ModelBindingContext) OnModelUpdating(ControllerContext, ModelBindingContext) OnModelUpdating(ControllerContext, ModelBindingContext)

Called when the model is updating.

OnPropertyValidated(ControllerContext, ModelBindingContext, PropertyDescriptor, Object) OnPropertyValidated(ControllerContext, ModelBindingContext, PropertyDescriptor, Object) OnPropertyValidated(ControllerContext, ModelBindingContext, PropertyDescriptor, Object)

Called when the specified property is validated.

OnPropertyValidating(ControllerContext, ModelBindingContext, PropertyDescriptor, Object) OnPropertyValidating(ControllerContext, ModelBindingContext, PropertyDescriptor, Object) OnPropertyValidating(ControllerContext, ModelBindingContext, PropertyDescriptor, Object)

Called when the specified property is validating.

SetProperty(ControllerContext, ModelBindingContext, PropertyDescriptor, Object) SetProperty(ControllerContext, ModelBindingContext, PropertyDescriptor, Object) SetProperty(ControllerContext, ModelBindingContext, PropertyDescriptor, Object)

Sets the specified property by using the specified controller context, binding context, and property value.

Applies to