ITempDataDictionary Interface¶
Represents a set of data that persists only from one request to the next.
- Namespace
Microsoft.AspNetCore.Mvc.ViewFeatures
- Assemblies
- Microsoft.AspNetCore.Mvc.ViewFeatures
Syntax¶
public interface ITempDataDictionary : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
-
interface
Microsoft.AspNetCore.Mvc.ViewFeatures.
ITempDataDictionary
Methods¶
-
Keep
()¶ Marks all keys in the dictionary for retention.
void Keep()
-
Keep
(System.String) Marks the specified key in the dictionary for retention.
Arguments: key (System.String) – The key to retain in the dictionary. void Keep(string key)
-
Load
()¶ Loads the dictionary by using the registered
Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider
.void Load()
-
Peek
(System.String)¶ Returns an object that contains the element that is associated with the specified key, without marking the key for deletion.
Arguments: key (System.String) – The key of the element to return. Return type: System.Object Returns: An object that contains the element that is associated with the specified key. object Peek(string key)
-
Save
()¶ Saves the dictionary by using the registered
Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider
.void Save()
-