Page.IsPostBack Property
Assembly: System.Web (in system.web.dll)
The following code example tests the value of the IsPostBack property to conditionally call the Page.Validate method for all validation server controls when the Page is loaded.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
When you dynamically populate databound controls (for example DropDownList) with data on Page_Load, you should usually check the IsPostBack variable and make sure you populate the data on the first page load instead of everytime the postback occurs.
Otherwise the data gets reloaded on every postback and some strange behavior can occur when you try to use the data.
- 8/20/2006
- DarkoLord