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 the four workflow principles? According to Microsoft, there are four main principles that define the behavior and working of workflows. Developers can use these princi

ASP Developer- We are needed to hire an ASP developer for some urgent work. He needs to add a new page to an already prepared site; the page is already completed in HTML. He jus

What are major difference between classic ADO and ADO.NET? Following are some major differences among both In ADO we have recordset and in ADO.NET we have dataset. In rec

What are benefits and Limitation of using Viewstate for state management The benefits of using Viewstate are as follows:- 1)    There is no server resources required because

This is a Customer Management project. Customer data is offered in a text file. The program may load this text data into its database columns. The data mapping is user definable. U

Importance of IT governance Governing and managing information technology is a crucial activity in organizations to generate business value. According to Ross & Weill (2004), f

Reversing the Numbers - C# Program Hello guys i need your advice. How can i reverse the integer number in c# project? Please recommend some examples.

If client side validation is enabled in your Web page, does that mean server side code is not run Whenever the client side validation is enabled server emit's JavaScript code f

What are the ways to implement locking in ADO.NET? There are many ways to implement locking using ADO.NET which are shown below:- 1)Whenever we call "Update" method of DataA

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