How do you use a custom validator? When might you want to
use one?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
About duration in caching technique ?
What is a web pool?
Which asp.net objects encapsulate the state of the client and the browser?
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?
What is the difference between ASP.NET Webforms and ASP.NET MVC?
Can I have a unique key as foreign key?
how can create login from create and written conde in asp.net
Why do we need Web Services?
What events will occur when a page is loaded?
How Clustered Index and Non clustered index stored on SQL server?
Can you edit data in the Repeater control?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)