if one of your validations is complicated and


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">

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: if one of your validations is complicated and
Reference No:- TGS0161311

Expected delivery within 24 Hours

©TutorsGlobe All rights reserved 2022-2023.