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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the Types of authentications in IIS

595


What is difference between web config and global asax?

441


How does u get record no from 5 to 15 from a dataset of 100 records?

509


Why is string called immutable data type?

589


Can you set which type of comparison you want to perform by the comparevalidator control?

520






What tags do you need to add within the asp:datagrid tags to bind columns manually? Give an example.

601


What is protected configuration?

599


Explain parts of assembly?

549


What is postback request?

551


Why is global asax is used?

606


Explain about Application and Session Events ?

635


What is the use of worker process in asp.net?

525


How can you apply a theme to your asp.net application?

533


Explain what is the procedure to create the environment for asp.net? : asp.net mvc

533


How does a content page differ from a master page?

503