Export (0) Print
Expand All

Web Forms Validation

Visual Studio .NET 2003

An important aspect of creating Web Forms pages for user input is to be able to check that the information users enter is valid. ASP.NET provides a set of validation controls that provide an easy-to-use but powerful way to check for errors and, if necessary, display messages to the user.

The following topics tell you more about validation controls and how to use them.

In This Section

Introduction to Validating User Input in Web Forms
Provides background information about using validation controls.
Types of Validation for ASP.NET Server Controls
Lists which validation controls are available and what types of validation you can perform with them.
Client-Side Validation for ASP.NET Server Controls
Explains how validation works in browsers that support Dynamic HTML (such as Internet Explorer 4.0 or later).
Special-Case Validation Results for ASP.NET Server Controls
Describes how validation controls work under specific circumstances and how they interact with one another.
Validation Error Message Layout for ASP.NET Server Controls
Describes how error message display affects the layout of your page.
Validating Required Entries for ASP.NET Server Controls
Gives directions for making sure users do not skip a field.
Validating Against a Specific Value for ASP.NET Server Controls
Gives directions for making sure users enter only one of a restricted set of values.
Validating Against a Data Type for ASP.NET Server Controls
Gives directions for making sure users enter only a date, a number, or some other specific data format.
Validating Against Patterns for ASP.NET Server Controls
Gives directions for checking that a user's entry follows a specific sequence of numbers, letters, or other characters (such as a phone number, postal code, e-mail address, and so on).
Validating Against a Range of Values for ASP.NET Server Controls
Gives directions for checking that a user's entry falls between a specified low and high value.
Validating Against Values in a Database for ASP.NET Server Controls
Gives directions for checking if a user's entry is contained in a table of acceptable or correct values.
Validating with a Custom Function for ASP.NET Server Controls
Gives directions for creating your own validation logic and tying it to a validation control.
Testing Validity Programmatically for ASP.NET Server Controls
Gives directions for testing whether the user's entries passed validation checking.
Controlling Validation Error Message Display for ASP.NET Server Controls
Gives directions for specifying where error messages are displayed.
Formatting Validation Error Messages for ASP.NET Server Controls
Gives directions for setting font, color, and other attributes of error messages.
Specifying Layout for In-Place Messages On ASP.NET Server Controls
Gives directions for controlling page layout with error-message display.
Disabling Validation for ASP.NET Server Controls
Gives directions for turning off validation in code.
Displaying Custom Error Messages for ASP.NET Server Controls
Gives directions for creating your own error display.
Validating Programmatically for ASP.NET Server Controls
Gives directions for calling validation controls from your own code.
Walkthrough: Validating User Input in a Web Forms Page
Gives step-by-step details on validating user input in a Web Forms page.

Related Sections

Introduction to ASP.NET Server Controls
Describes the two general types of server controls and how they differ.
Introduction to ASP.NET Web Applications in Visual Studio
Provides an overview of the components of an ASP.NET Web application, including Web Forms pages and XML Web services, and how Visual Studio helps you create a Web application.
Introduction to Web Forms Pages
Presents a high-level overview of Web Forms pages and describes why Web Forms pages solve problems unique to Web application development.
Walkthrough: Validating User Input in a Web Forms Page
Describes how to use Web Forms validation controls to check user entries without code, including required entries, data types, ranges, patterns, and specific values.
Show:
© 2015 Microsoft