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 |
What is asynchronous call?
Explain the difference between web user control and web custom control?
Describe the .net base class library.
What is the Difference between Web.config and global.asax? Can we write connection String code in global.asax?
What is mvc in angular?
Explain the code Access Security (CAS) in .net Framework?
Explain < @OutputCache% > and the usage of VaryByParam, VaryByHeader ?
What property is used on the datatable to indicate a conflict after an update? a) HasConflict b) HasError c) HasCollision d) HasDataError
Explain what is an abstract class?
.net allows which inheritence
6 Answers AG Technologies, Samcomm,
Define state managenent?Descibe state managenent technique which maintain the information at server site focusing it IDS features and limitations?
What is difference between ASP and ASP.NET ?