Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Thanked 0 Times in 0 Posts

    Post validating .net validation controls using javascript

    I need to validate multiple .net validation groups(a normal group would consist of RequiredFieldValidators, RegularExpressionValidators, ValidationSummary, etc) using javascript. I am using Page_ClientValidate("GroupName") to validate the groups. The problem arises when i validate multiple groups. The validation summary and errors only appear for the last group validated or nothing appears if the last group validated returns true. I want all validation summaries and errors to appear for all groups that return a false validation. I'll never validate all groups, so I can't use Page_ClientValidate(). I have multiple tabs on a page and each tab has 1 or more validation groups assigned to it. Any ideas/solutions would be most appreciated. I've hit a wall for now.

    Example of what i am doing:

    var Tab1 = false;var Tab2 = false;var Tab3 = false;

    Tab1 = Page_ClientValidate("Tab1");
    Tab2 = Page_ClientValidate("Tab2");
    Tab3 = Page_ClientValidate("Tab3");

    if(Tab1 && Tab2 && Tab3)

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Between DC and Baltimore In a Cave
    Thanked 94 Times in 88 Posts
    This really has nothing to do with Ajax and design and should have been posted in the .NET section of the forum.

    Sounds like the validation control overrides whatever is in the output summary section. It might be easier to code your own with a custom validator if the documentation does not tell you anything else.

    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts