---
title: "Ajax Toolkit ValidatorCalloutExtender Control in ASP.Net"  
description: "ValidatorCallout is an ASP.NET AJAX extender that enhances the functionality of existing ASP.NET validators. To use this control, add an input field a"  
author: "Pushpendra Singh"  
published: 2010-12-05  
updated: 2020-02-03  
canonical: https://www.mindstick.com/articles/289/ajax-toolkit-validatorcalloutextender-control-in-asp-dot-net  
category: "ajax"  
tags: ["ajax"]  
reading_time: 2 minutes  

---

# Ajax Toolkit ValidatorCalloutExtender Control in ASP.Net

ValidatorCallout is an ASP.NET AJAX extender that enhances the [functionality](https://www.mindstick.com/blog/136/using-watermark-functionality-in-textbox-by-jquery) of existing ASP.NET validators. To use this control, add an [input field](https://www.mindstick.com/forum/158095/how-to-update-the-knockout-js-input-field-from-a-content-script-on-chrome-extension) and a [validator](https://www.mindstick.com/interview/598/give-the-details-of-xml-files-used-in-validator-framework) control as you normally would. Then add the ValidatorCallout and set its TargetControlID [property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin) to [reference](https://www.mindstick.com/forum/34619/call-by-value-and-call-by-reference) the validator control.\

**ValidatorCallout [Properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule):**

· **TargetControlID** - The ID of the Validator to extend

· **Width** - The width of the callout

· **WarningIconImageUrl** - The path to a custom warning icon image

· **CloseImageUrl** - The path to a custom close image

## Code:

```
 <%-- ScriptManager control manages client script for AJAX enabled ASP.NET pages.This enables partial-page rendering and Web-service calls.You have to used this if you want to use ajax control--%><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <%--Add the ValidatorCalloutExtender and some control--%><cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" TargetControlID="RequiredFieldValidator1"></cc1:ValidatorCalloutExtender>  <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" TargetControlID="RequiredFieldValidator2"></cc1:ValidatorCalloutExtender>  <asp:Label ID="Label1" runat="server" Text=" Name"></asp:Label><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Enter your name" ControlToValidate="TextBox1" Display="None"></asp:RequiredFieldValidator><br /><asp:Label ID="Label2" runat="server" Text="Phone number"></asp:Label><asp:TextBox ID="TextBox2" runat="server" MaxLength="10"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Enter you phone number" Display="None"ControlToValidate="TextBox2"> </asp:RequiredFieldValidator></div><p><asp:Button ID="Button1" runat="server" Text="Submit" onclick="Button1_Click" /></p><p>&nbsp;</p><asp:Label ID="Label3" runat="server"></asp:Label>
```

[Display message](https://www.mindstick.com/forum/12797/how-to-show-display-message-box-in-c-sharp-asp-dot-net-forms) of RequiredFieldValidator should be "None"( Display="None")

**Run the project**

![AjaxControl Toolkit ValidatorCalloutExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/086d85d8-8721-4689-b950-5347b511738f/images/81b19d76-ac2f-4e2e-ae6f-e743a8534e12.png)

![AjaxControl Toolkit ValidatorCalloutExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/086d85d8-8721-4689-b950-5347b511738f/images/d205ab31-0192-45e7-8130-eb39b4d6be2a.png)

When you click [Submit button](https://www.mindstick.com/forum/130/its-possible-without-submit-button) then [error message](https://www.mindstick.com/forum/23174/error-message-the-page-you-are-requesting-cannot-be-served-because-of-the-extension-configuration) will show

When you enter Name and [click button](https://www.mindstick.com/forum/34274/how-to-pass-combobox-value-from-windows-form-edirrow-to-windows-form-form1-where-click-button) then error message will show for second Textbox

![AjaxControl Toolkit ValidatorCalloutExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/086d85d8-8721-4689-b950-5347b511738f/images/bbe8f4dc-fbaa-4f20-b73f-f90fdc563ad6.png)

Enter Name and phone number and click Submit button then message will show in Label

![AjaxControl Toolkit ValidatorCalloutExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/086d85d8-8721-4689-b950-5347b511738f/images/32832fc6-dd3a-4f47-935d-25b65de86b4b.png)

---

Original Source: https://www.mindstick.com/articles/289/ajax-toolkit-validatorcalloutextender-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
