ModelStateDictionary.Add Method (KeyValuePair(String, ModelState))

Adds the specified item to the model-state dictionary.

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

public final function Add(
	item : KeyValuePair<String, ModelState>
)

Parameters

item
Type: System.Collections.Generic.KeyValuePair(String, ModelState)

The object to add to the model-state dictionary.

Implements

ICollection(T).Add(T)

ExceptionCondition
NotSupportedException

The model-state dictionary is read-only.

Show: