Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you use a custom validator? When might you want to
use one?

Answers were Sorted based on User's Feedback



How do you use a custom validator? When might you want to use one?..

Answer / sravanthi kilari

Insert Custom Validator Control and then write the custom
function. If Other Validation Controls did't meet our
requirement then we will go to Custom Validator Control.

Is This Answer Correct ?    4 Yes 1 No

How do you use a custom validator? When might you want to use one?..

Answer / pallavi

Field: <asp:textbox id="textbox1" runat="server">
<asp:CustomValidator id="valCustom" runat="server"
ControlToValidate="textbox1"
ClientValidationFunction="ClientValidate"
OnServerValidate="ServerValidate"
ErrorMessage="*This box is not valid" dispaly="dynamic">*
</asp:CustomValidator>

ClientValidationFunction is usually a javascript funtion included in the html to the user. OnServerValidate is the function that is server-side to check for validation if client does not support client-side validation.

Is This Answer Correct ?    1 Yes 0 No

How do you use a custom validator? When might you want to use one?..

Answer / santosh bind

when using the complex validation like text should not contain the max 50 char

protected void cusCustom_ServerValidate(object sender, ServerValidateEventArgs e)
{
if(e.Value.Length == 10)
e.IsValid = true;
else
e.IsValid = false;
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

In which form does the dataset store data in it?

3 Answers   Verinon Technology Solutions,


How many types of sessions are there?

2 Answers  


What is application variable in asp.net?

0 Answers  


Types of session management in ASP.NET ?

2 Answers   Microsoft,


Is asp.net mvc front end or backend? : Asp.Net MVC

0 Answers  


What is the use of location tag in web.config file

2 Answers   Karur Vysya Bank KVB,


How to implement caching?

2 Answers   Infosys, Microsoft,


what is session . how it is use ?

3 Answers   TCS,


What is validation in asp.net?

0 Answers  


When was asp.net released?

0 Answers  


Explain program to call the js function when the change is being made in the dropdown list made in asp.net mvc? : asp.net mvc

0 Answers  


What is the difference between adding reference in solution explorer and adding references by using ?

0 Answers  


Categories