ViewDataDictionary.Add Method (String, Object)
Visual Studio 2010
Adds an element to the collection using the specified key and value .
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Parameters
- key
- Type: System.String
The key of the element to add.
- value
- Type: System.Object
The value of the element to add.
Implements
IDictionary(Of TKey, TValue).Add(TKey, TValue)| Exception | Condition |
|---|---|
| NotSupportedException | The IDictionary(Of TKey, TValue) object is read-only. |
| ArgumentNullException | key is null. |
| ArgumentException | An element with the same key already exists in the IDictionary(Of TKey, TValue) object. |
Community Additions
ADD
Show: