Page.DeterminePostBackMode Page.DeterminePostBackMode Page.DeterminePostBackMode Page.DeterminePostBackMode Method


使用 POST 或 GET 命令傳回,回傳至頁面的資料 NameValueCollectionReturns a NameValueCollection of data posted back to the page using either a POST or a GET command.

protected public:
 virtual System::Collections::Specialized::NameValueCollection ^ DeterminePostBackMode();
protected internal virtual System.Collections.Specialized.NameValueCollection DeterminePostBackMode ();
abstract member DeterminePostBackMode : unit -> System.Collections.Specialized.NameValueCollection
override this.DeterminePostBackMode : unit -> System.Collections.Specialized.NameValueCollection
Protected Friend Overridable Function DeterminePostBackMode () As NameValueCollection


包含表單資料的 NameValueCollection 物件。A NameValueCollection object that contains the form data. 如果回傳使用 POST 命令,則會從 Context 物件傳回表單資訊。If the postback used the POST command, the form information is returned from the Context object. 如果回傳使用 GET 命令,則會傳回查詢字串資訊。If the postback used the GET command, the query string information is returned. 如果網頁是第一次被要求,則傳回 nullIf the page is being requested for the first time, null is returned.


DeterminePostBackMode方法會傳回物件,其中包含回傳NameValueCollection至頁面的資料。The DeterminePostBackMode method returns a NameValueCollection object that contains the data posted back to the page. 頁面隱藏欄位 VIEWSTATE 和 EVENTTARGET 的存在是用來協助判斷是否發生回傳事件。The presence of the page hidden fields VIEWSTATE and EVENTTARGET is used to help determine whether a postback event has occurred. 呼叫IsPostBack 方法DeterminePostBackMode時,會設定屬性。The IsPostBack property is set when the DeterminePostBackMode method is called.