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.

適用於

另請參閱