Table of Contents

Class ModelBindingContext

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Provides the context in which a model binder functions.

public class ModelBindingContext
Inheritance
ModelBindingContext
Inherited Members

Constructors

ModelBindingContext()

Initializes a new instance of the ModelBindingContext class.

public ModelBindingContext()

ModelBindingContext(ModelBindingContext)

Initializes a new instance of the ModelBindingContext class using the binding context.

public ModelBindingContext(ModelBindingContext bindingContext)

Parameters

bindingContext ModelBindingContext

The binding context.

Properties

FallbackToEmptyPrefix

Gets or sets a value that indicates whether the binder should use an empty prefix.

public bool FallbackToEmptyPrefix { get; set; }

Property Value

bool

true if the binder should use an empty prefix; otherwise, false.

Model

Gets or sets the model.

public object Model { get; set; }

Property Value

object

The model.

ModelMetadata

Gets or sets the model metadata.

public ModelMetadata ModelMetadata { get; set; }

Property Value

ModelMetadata

The model metadata.

ModelName

Gets or sets the name of the model.

public string ModelName { get; set; }

Property Value

string

The name of the model.

ModelState

Gets or sets the state of the model.

public ModelStateDictionary ModelState { get; set; }

Property Value

ModelStateDictionary

The state of the model.

ModelType

Gets or sets the type of the model.

public Type ModelType { get; set; }

Property Value

Type

The type of the model.

PropertyFilter

Gets or sets the property filter.

public Predicate<string> PropertyFilter { get; set; }

Property Value

Predicate<string>

The property filter.

PropertyMetadata

Gets the property metadata.

public IDictionary<string, ModelMetadata> PropertyMetadata { get; }

Property Value

IDictionary<string, ModelMetadata>

The property metadata.

ValueProvider

Gets or sets the value provider.

public IValueProvider ValueProvider { get; set; }

Property Value

IValueProvider

The value provider.