Hi,
How to work with Custom Validator in ASP.NET? In which type of application it is used?
Thanks.
Custom Validator in ASP.NET
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Priya LingeRank #785 · 2.9K reputationPosted Dec 28, 2011, 8:44 PM EST
1.CustomValidator
Performs user-defined validation on an input control.
The control allows you to validate both clientside and serverside, where the serverside approach is probably
the most powerful.
2.Example :
Check the length of the string in the TextBox using CustomValidator.
Custom text:
protected void cusCustom_ServerValidate(object sender, ServerValidateEventArgs e)
{
if(e.Value.Length == 8)
e.IsValid = true;
else
e.IsValid = false;
}
Hope this will help you.
Thanks.
Satyapriya NayakRank #47 · 31.5K reputationPosted Dec 28, 2011, 11:17 PM EST
Please refer the below links
http://www.w3schools.com/aspnet/control_customvalidator.asp
http://asp.net-tutorials.com/validation/custom-validator/
http://www.beansoftware.com/ASP.NET-Tutorials/Validation-Controls.aspx
Thanks