Page.Items Page.Items Page.Items Page.Items Property

定義

取得頁面內容中儲存的物件清單。Gets a list of objects stored in the page context.

public:
 property System::Collections::IDictionary ^ Items { System::Collections::IDictionary ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Collections.IDictionary Items { get; }
member this.Items : System.Collections.IDictionary
Public ReadOnly Property Items As IDictionary

屬性值

IDictionary 的參考,其中包含頁面內容中儲存的物件。A reference to an IDictionary containing objects stored in the page context.

備註

Items使用屬性,即可儲存具有與頁面要求相同之存留期的物件。Use the Items property to store objects with the same lifetime as the page request. 這個屬性是唯讀的;不過,您可以將物件新增至IDictionary它所傳回的物件。This property is read-only; however, you can add objects to the IDictionary object it returns.

加入至Items屬性的物件可在頁面的整個存留期間使用,因此,您可以在頁面生命Items週期初期的事件中,將物件新增至屬性,並在稍後的事件中存取這些物件。Objects added to the Items property are available throughout the lifetime of the page, so you can add objects to the Items property in events early in the page life cycle and access those objects in later events.

適用於