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
What are different transaction levels in SQL SERVER? The Transaction Isolation level decides how is the one process isolated from theother process. Using the transaction levels

Converting $ into Rs.  - C# Program I am a learner of C# language and i am struggling with how to convert $ into Rs. in C#. Can you have any code examples for this?

Why do we need static methods for Post Cache substitution? The ASP.NET should be able to call this static method even when there isn't an instance of your page class available.

How to decide on the design consideration to take a Datagrid, datalist or repeater? So many make a blind choice of choosing datagrid directly, but that is not the right way.

Perform Arithmetic Operations - c# Program Hello, i didn't find the correct way of using arithmetic operations in c#. I am beginner for this language. Please suggest me some e

Is spending in projects constant throughout the project? Generally in initial stage of projects (design and requirement phase) the cost is very less (as you require maximum bus

What is Operator Overloading in .NET? It gives a way to define and use operators like +, -, and / for user-defined classes or structs. It permits us to define/redefine the way

What are LeaseTime, Sponsorship Time, Renew on Call Time and Lease Manager Poll Time? In the normal .NET environment objects lifetime is managed by garbage collector. But inrem

A Super-hero Sharepoint developer with great design skills Project Description: US: Our start-up company develops a very cool and innovative SharePoint related product with c

What is a delegate? A delegate is similar to a class that is used for storing the reference to a method and invoking that method at runtime, as needed. A delegate can hold the