ValidationSummary Class
Assembly: System.Web.Mobile (in system.web.mobile.dll)
The ValidationSummary class creates a summary of all validation errors and presents them either inline or on a separate form. The ValidationSummary uses the text in the ErrorMessage property for the errors that are displayed either inline or on a summary form.
Although the ValidationSummary class of the ASP.NET mobile controls mimics the behavior of the Web Forms ValidationSummary class in many ways, the mobile controls version of the class does not inherit directly from the Web Forms version of the class. Thus, properties that modify the output of the validation summary, such as the DisplayMode property, are not available in mobile controls. The mobile controls version of the summary is derived directly from the MobileControl class.
The following code example demonstrates how to create an instance of a ValidationSummary class, and add it to a form in an ASP.NET mobile Web application during a page load. The user-defined Page_Load event handler determines if there is an error, and then either launches the form containing the ValidationSummary, or the congratulatory thank you form.
Security Note: |
|---|
| This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview (Visual Studio). |
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
System.Web.UI.Control
System.Web.UI.MobileControls.MobileControl
System.Web.UI.MobileControls.ValidationSummary
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Security Note: