UserControl.IsPostBack Property
.NET Framework (current version)
Gets a value indicating whether the user control is being loaded in response to a client postback, or if it is being loaded and accessed for the first time.
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System.Booleantrue if the user control is being loaded in response to a client postback; otherwise, false.
The following example adds two key value pairs to the application state associated with a user control if the user control's IsPostBack property returns false. When this condition is met, the code uses the Add method, through the user control's Application property, to add the keys and their values.
.NET Framework
Available since 1.1
Available since 1.1
Show: