Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3223736
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:08:30+00:00 2026-05-17T16:08:30+00:00

Two things: Is it possible to set the Page.IsValid (Is_Valid) property through Jquery so

  • 0

Two things:

  1. Is it possible to set the Page.IsValid (Is_Valid) property through Jquery so that I dont have to use the aspx validators? It is my understanding that the IsValid property is read-only?

  2. When the validators are in, is it possible to find out, through Jquery (ofcourse) which controls caused the validation to fail? An example would be a form with loads of text boxes: user clicks the button and I get my results in a validation summary. All fine and dandy. But I also want to let the users know which controls they are by changing the respective textbox background to lets say, red.

Now the hack for that would be that I call my own JS function that checks all the textboxes for validation (again) and then change the css to invalid ones to show red. But I would have thought there surely must be a way to identity which controls failed the validation?

Any insight?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:08:30+00:00Added an answer on May 17, 2026 at 4:08 pm

    (A) is not possible. Page.IsValid is set by server-side validation and the client should not mess with it. Client-side validation doesn’t post back if it fails anyway, so Page.Validate() isn’t even called in that case.

    The AJAX Control Toolkit achieves (B) by rebinding the validation functions. You can try something like the following:

    [Disclaimer: I’m not as familiar with jQuery (yet), so I’ll use plain JS. Feel free to translate to the appropriate jQuery idioms.]

    for (var i = 0; i < window.Page_Validators.length; ++i) {
        var validator = window.Page_Validators[i];
        validator.__old_evaluationfunction = validator.evaluationfunction;
        validator.evaluationfunction = function(value) {
            var element = validator.controltovalidate;
            if (!validator.__old_evaluationfunction(value)) {
                // Validation failed - turn `element` red, scream at the user, etc.
                return false;
            } else {
                // Validation succeeded - restore `element` to its normal state.
                return true;
            }
        };
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two ASP.NET pages: site.com/foo/bar.aspx that should be world accessible and site.com/foo/baz.aspx that
I'm working on a Spring application that simply searches a set of data for
Semi-unimportant background: I'm working on a page with two sets of collapsable panels. (using
I have developed a blog application of sorts that I am trying to allow
I have a blog written in Django, and I started using the basic Django
I have put together a script which is very much like the flickr photostream
By common script startup sequence, what I mean is that in the majority of
I need a way to load multiple style sheets with the same rule names,
I need to get 5 random records from a table plus a further record
I'm writing a shopping cart in PHP, and part of its function is to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.