ITempData 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供字典以儲存後續請求所需的資料。 儲存在 TempData 的資料在讀取後會自動移除,除非Keep()Keep(String)被呼叫或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))
- 實作
-
ICollection<KeyValuePair<String,Object>> ICollection<KeyValuePair<TKey,TValue>> IDictionary<String,Object> IEnumerable<KeyValuePair<String,Object>> IEnumerable<KeyValuePair<TKey,TValue>> IEnumerable<T> IEnumerable
方法
| 名稱 | Description |
|---|---|
| Get(String) |
取得與指定金鑰相關的值,然後排程刪除。 |
| Keep() |
它會讓目前 TempData 中的所有金鑰持續存在,等待另一個請求。 |
| Keep(String) |
讓帶有 的 |
| Peek(String) |
取得與指定金鑰相關的值,且不會排程刪除。 |