---
title: "Explain the validation controls. How many validation controls in ASP.NET 4.0?"  
description: "Explain the validation controls. How many validation controls in ASP.NET 4.0?"  
author: "Sumit Kesarwani"  
published: 2014-09-01  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/2108/explain-the-validation-controls-how-many-validation-controls-in-asp-dot-net-4-0  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 2 minutes  

---

# Explain the validation controls. How many validation controls in ASP.NET 4.0?

Validation controls are responsible to validate the data of an input control. Whenever you provide any input to an application, it performs the validation and displays an error message to user, in case the validation fails.

ASP.NET 4.0 contains the following six types of validation controls:

- CompareValidator - Performs a comparison between the values contained in two controls.
- CustomValidator - Writes your own method to perform extra validation.
- RangeValidator- Checks value according to the range of value.
- RegularExpressionValidator - Ensures that input is according to the specified pattern or not.
- RequiredFieldValidator - Checks either a control is empty or not.
- ValidationSummary - Displays a summary of all validation error in a central location.

## Answers

### Answer by Sumit Kesarwani

Validation controls are responsible to validate the data of an input control. Whenever you provide any input to an application, it performs the validation and displays an error message to user, in case the validation fails.

ASP.NET 4.0 contains the following six types of validation controls:

- CompareValidator - Performs a comparison between the values contained in two controls.
- CustomValidator - Writes your own method to perform extra validation.
- RangeValidator- Checks value according to the range of value.
- RegularExpressionValidator - Ensures that input is according to the specified pattern or not.
- RequiredFieldValidator - Checks either a control is empty or not.
- ValidationSummary - Displays a summary of all validation error in a central location.


---

Original Source: https://www.mindstick.com/interview/2108/explain-the-validation-controls-how-many-validation-controls-in-asp-dot-net-4-0

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
