How do you use a custom validator? When might you want to
use one?
Answer Posted / 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 |
Post New Answer View All Answers
Differentiate between a hyperlink control and a linkbutton control.
What are the uses of reflection?
What is data binding in asp net?
Can you explain the basic use of dataview?
What New Features comes with ASP.NET Web API 2.0?
How long should a session id be?
What's the use of response.output.write()?
What is the concept of view state in asp.net?
What is difference between asp.net and asp.net mvc? : Asp.Net MVC
Explain about ASP.NET?
Explain the difference between authentication and authorization.
What is asp net application object?
Explain how does asp page work?
Where do we store our connection string in asp.net application?
How many web config files can be created for an application?