Validations, DOT NET Programming

If one of your validations is complicated and does not fit in any validators, what you do?

The best way is to go for CustomValidators. The sample code for a custom validator  is shown below which checks that the  textbox should not have zero value.

Validator id="CustomValidator1" runat="server" ErrorMessage="Number not divisible by Zero" ControlToValidate="txtNumber" OnServerValidate="ServerValidate" ClientValidationFunction="CheckZero" />

Input:

TextBox id="txtNumber" runat="server" />

t language="javascript">

Posted Date: 9/22/2012 6:54:09 AM | Location : United States







Related Discussions:- Validations, Assignment Help, Ask Question on Validations, Get Answer, Expert's Help, Validations Discussions

Write discussion on Validations
Your posts are moderated
Related Questions
ASP.NET/MSSQL/ MVC completing backend solution + integrating with frontend. Project Description: System is used for tracking company's activities through several projects by


What is nested Classes? You can access an array using the INDEX value of that array, but how many times you know the real value of the index. The Hashtable provides a way of ac

Printing and adding Fibonacci series - C# Program Hello guys i need your advice. How can i print and add Fibonacci series in my project. Please recommend some examples.

How to use datagrid view

What is the relationship between a class and an object? A class acts as a blue-print that explains the properties, states, and behaviors that are common to a number of objects.

What is DCOM? DCOM is different from COM in that it allows for creating objects distributed around  a network, and a protocol for invoking that object's methods, & secures the

I need to Develop a real state website We want a programmer who can create a website using html5, css3, jQuery, php, MySQL. All connected to a CRM to accomplish all the informat

Social Media project Project Description: It's a Windows Phone application which requires the subsequent capabilities: -Live Video Streaming -Social Networking capabili

I've some encrypted data list of customers that are stored in a sql server db. These data are encrypted using visual basic, using a specific dll, from what I could see. The work