Share via


ITempData Interface

Definition

Provides a dictionary for storing data that is needed for subsequent requests. Data stored in TempData is automatically removed after it is read unless Keep() or Keep(String) is called, or it is accessed via Peek(String).

public interface ITempData : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IDictionary<string,object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>>
type ITempData = interface
    interface IDictionary<string, obj>
    interface ICollection<KeyValuePair<string, obj>>
    interface seq<KeyValuePair<string, obj>>
    interface IEnumerable
Public Interface ITempData
Implements ICollection(Of KeyValuePair(Of String, Object)), IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object))
Implements

Methods

Name Description
Get(String)

Gets the value associated with the specified key and then schedules it for deletion.

Keep()

Makes all of the keys currently in TempData persist for another request.

Keep(String)

Makes the element with the key persist for another request.

Peek(String)

Gets the value associated with the specified key without scheduling it for deletion.

Applies to