DefaultModelBinder Class

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

Inheritance Hierarchy

System.Object
  System.Web.Mvc.DefaultModelBinder

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

Syntax

'Declaration
Public Class DefaultModelBinder _
    Implements IModelBinder
'Usage
Dim instance As DefaultModelBinder
public class DefaultModelBinder : IModelBinder
public ref class DefaultModelBinder : IModelBinder
type DefaultModelBinder =  
    class 
        interface IModelBinder 
    end
public class DefaultModelBinder implements IModelBinder

The DefaultModelBinder type exposes the following members.

Constructors

  Name Description
Public method DefaultModelBinder Initializes a new instance of the DefaultModelBinder class.

Top

Properties

  Name Description
Protected property Binders Gets or sets the model binders for the application.
Public propertyStatic member ResourceClassKey Gets or sets the name of the resource file (class key) that contains localized string values.

Top

Methods

  Name Description
Public method BindModel Binds the model by using the specified controller context and binding context.
Protected method BindProperty Binds the specified property by using the specified controller context and binding context and the specified property descriptor.
Protected method CreateModel Creates the specified model type by using the specified controller context and binding context.
Protected methodStatic member 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.
Protected methodStatic member 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.
Protected methodStatic member CreateSubPropertyName Creates the name of the subproperty by using the specified prefix and property name.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Protected method GetFilteredModelProperties Returns a set of properties that match the property filter restrictions that are established by the specified binding context.
Public method GetHashCode (Inherited from Object.)
Protected method GetModelProperties Returns the properties of the model by using the specified controller context and binding context.
Protected method GetPropertyValue Returns the value of a property using the specified controller context, binding context, property descriptor, and property binder.
Public method GetType (Inherited from Object.)
Protected method GetTypeDescriptor Returns the descriptor object for a type that is specified by its controller context and binding context.
Protected methodStatic member IsModelValid Determines whether a data model is valid for the specified binding context.
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnModelUpdated Called when the model is updated.
Protected method OnModelUpdating Called when the model is updating.
Protected method OnPropertyValidated Called when the specified property is validated.
Protected method OnPropertyValidating Called when the specified property is validating.
Protected method SetProperty Sets the specified property by using the specified controller context, binding context, and property value.
Public method ToString (Inherited from Object.)

Top

Remarks

The DefaultModelBinder class maps the following types of objects to a browser request:

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Mvc Namespace