TempDataDictionary.Add Method
Adds an element that has the specified key and value to the IDictionary(Of TKey, TValue) object.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
'Declaration Public Sub Add ( _ key As String, _ value As Object _ ) 'Usage Dim instance As TempDataDictionary Dim key As String Dim value As Object instance.Add(key, value)
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 that has the same key already exists in the IDictionary(Of TKey, TValue) object. |
Show: