Page.DeterminePostBackMode Method

Definition

Returns a NameValueCollection of data posted back to the page using either a POST or a GET command.

C#
protected virtual System.Collections.Specialized.NameValueCollection DeterminePostBackMode();
C#
protected internal virtual System.Collections.Specialized.NameValueCollection DeterminePostBackMode();

Returns

A NameValueCollection object that contains the form data. If the postback used the POST command, the form information is returned from the Context object. If the postback used the GET command, the query string information is returned. If the page is being requested for the first time, null is returned.

Remarks

The DeterminePostBackMode method returns a NameValueCollection object that contains the data posted back to the page. The presence of the page hidden fields VIEWSTATE and EVENTTARGET is used to help determine whether a postback event has occurred. The IsPostBack property is set when the DeterminePostBackMode method is called.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also