ModelStateDictionary.Add Method (String, ModelState)
Visual Studio 2010
Adds an element that has the specified key and value to the model-state dictionary.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Parameters
- key
- Type: System.String
The key of the element to add.
- value
- Type: System.Web.Mvc.ModelState
The value of the element to add.
Implements
IDictionary(Of TKey, TValue).Add(TKey, TValue)| Exception | Condition |
|---|---|
| NotSupportedException | The model-state dictionary is read-only. |
| ArgumentNullException | key is Nothing. |
| ArgumentException | An element that has the specified key already occurs in the model-state dictionary. |
Community Additions
ADD
Show: