Gets a value indicating whether page validation succeeded.
Assembly: System.Web (in System.Web.dll)
For this property to return true, all validation server controls in the current validation group must validate successfully. You should check this property only after you have called the Page.Validate method, or set the CausesValidation property to true in the OnServerClick event handler for an ASP.NET server control that initiates form processing. These server controls include the Button, HtmlButton, HtmlInputButton, HtmlInputImage, ImageButton, and LinkButton classes.
If you force validation of a validation group using the Validate method, then all validation controls in the specified validation group must validate successfully as well.
The following code example demonstrates using the property to set up a conditional statement. If the property returns true, the Text property of the lblOutput control is set to "Page is valid!" Otherwise, it is set to "Some of the required fields are empty."
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.