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 CLR?  CLR(Common Language Runtime) is the major resource of .Net Framework. It is collection of services such as garbage collector, exception handler, jit compilers etc

Problem: (a) Define the term ViewState as used in the ASP.NET framework. (b) What is a StateBag class? Give a simple example to support your answer. (c) (i) Distingui

The Full form of CLR is Common Language Runtime and it is  the heart of the .NET framework. All Languages have its own runtime and its the responsibility of the runtime to take car

Converting temperature from Fahrenheit to Celsius - Program C# I am facing some problems in the code for Converting temperature from Fahrenheit to Celsius. Can anybody suggest

What are advantages of using UML? As the name suggests the UNIFIED MODELING LANGUAGE, The Modeling has been around for years, not only in the software field but also in other t

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

ASP.NET/MSSQL/ MVC completing backend solution + integrating with frontend. - repost Project Description: System is used for tracking company's activities through several pro

Project Description: I need to get lync server 2013 fixed the issues it has hit: 1) Can't connect to it outside network, I think small firewall problem with a little issue in

Explain the concept of Bookmarks in WF 4.0. In WF 4.0, a bookmark is a mechanism that enables an activity to wait for an input without interrupting a workflow thread. When an a

When we create a private constructor, we can not create object of the class directly from the client. So you will use the private constructors whenever you do not want instances of