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

About duration in caching technique ?

4 Answers   Accenture,


What is a web pool?

0 Answers  


Which asp.net objects encapsulate the state of the client and the browser?

0 Answers  


Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process?

1 Answers   Patni, Perot Systems, Sedna Technology,


How to disable validator control by client side JavaScript?

0 Answers  


What is the difference between ASP.NET Webforms and ASP.NET MVC?

0 Answers  


Can I have a unique key as foreign key?

0 Answers  


how can create login from create and written conde in asp.net

0 Answers  


Why do we need Web Services?

1 Answers   Mind Tree,


What events will occur when a page is loaded?

0 Answers  


How Clustered Index and Non clustered index stored on SQL server?

2 Answers   TCS,


Can you edit data in the Repeater control?

11 Answers   CAC, Creative,


Categories