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
Explain how is the asp.net mvc architecture different from others? : asp.net mvc
What is asp.net caching?
In which event of the page viewstate is available?
What is intrinsic objects in asp.net?
What is is post back property in asp net?
How much is the pay-for-use service if I chose not to use microsoft-sponsored advertising?
What is IPostBack? How to use it?
Differentiate globalization and localization.
How to find out what version of asp.net I am using on my machine?
What is caching? What are different ways of caching in asp.net?
What is asp net theme?
What is the difference between page-level caching and fragment caching?
Explain the page lifecycle of an asp.net mvc? : asp.net mvc
Explain about the .NET framework?
How do we implement bundling in MVC?