---
title: "CustomValidator in ASP.NET"  
description: "CustomValidator in ASP.NET"  
author: "Anonymous User"  
published: 2010-10-18  
updated: 2010-10-18  
canonical: https://www.mindstick.com/forum/49/customvalidator-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# CustomValidator in ASP.NET

Hi GuysPlease help\
How to use CustomValidator in [ASP.NET](https://www.mindstick.com/articles/934/default-folders-available-inside-the-asp-dot-net-application-folder)?\
with [sample](https://www.mindstick.com/news/2174/mars-mission-by-nasa-prepares-for-tests) code.\
Thanks\

## Replies

### Reply by Amit Singh

CustomValidator is a server side validator\
we create function to particular control. we give the particular validator condition\
for example\

```
<script>
function check()
{
//give the condition
}
</script>
<asp:TextBox id="txtBox"></asp:TextBox>
<asp:CustomValdator TargetControlID="txtBox" onClick="check();"></asp:CustomValidator>
```


---

Original Source: https://www.mindstick.com/forum/49/customvalidator-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
