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 is pareto principle? The Pareto principle also paraphrased as 80/20 principle is simple effective problem tackling way in the management. It says that 20% of your problems

What is the difference between int and int32. There is no difference among int and int32. System.Int32 is a .NET Class and int is an alias name for System.Int32.

Among the items that are related to the implementation of an application for automation of processes, are shown as follows: a) The online patient registry through which patients

31: Need to develop Doctor Appointments application in .NET Project Description: I am seeking a .NET Web application which can do the subsequent: 1. Taking doctors and

Project Description: We require.NET ( C#.Net or VB.Net ) application to send whatsapp message : - The application could be connected to SQL server database to fetch the conta

What are benefits and limitations of using Hidden frames 1)    The benefits of using hidden frames are as follows: 2)    More than one data field can cache. 3)    The abi

Explain the WSDL. WSDL is a short form for Web Services Description Language, which is used to explain a Web service in terms of the messages that it forms and accepts. The WS

Explain MVC and how it is diffrennt from Asp.net

What is basic use of "DataView"? The "DataView" represents the whole table or can be small parts of rows depending on some criteria. It is the best used for sorting and finding

Can you define what inheritance is and an example of when you might use it? The process of deriving a new class from an existing class is known as Inheritance. The old class is