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

  • Home
  • SEARCH
  • 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 739867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:26:59+00:00 2026-05-14T08:26:59+00:00

Does anyone know if there is a way to get a list of controls

  • 0

Does anyone know if there is a way to get a list of controls that have the ErrorProvider icon active. ie. any controls that failed validation. I’m trying to avoid looping all controls in the form.

I’d like to display some sort of message indicating how many errors there are on the form. As my form contains tabs I’m trying to make it apparent to the user that errors may exist on inactive tabs and they need to check all tabs.

Thanks

Barry

  • 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-14T08:27:00+00:00Added an answer on May 14, 2026 at 8:27 am

    This falls in the category of “how can you not know”. It is your code that is calling ErrorProvider.SetError(), you should have no trouble keeping track of how many errors are still active. Here’s a little helper class, use its SetError() method to update the ErrorProvider. Its Count property returns the number of active errors:

    private class ErrorTracker {
      private HashSet<Control> mErrors = new HashSet<Control>();
      private ErrorProvider mProvider;
    
      public ErrorTracker(ErrorProvider provider) { 
        mProvider = provider; 
      }
      public void SetError(Control ctl, string text) {
        if (string.IsNullOrEmpty(text)) mErrors.Remove(ctl);
        else if (!mErrors.Contains(ctl)) mErrors.Add(ctl);
        mProvider.SetError(ctl, text);
      }
      public int Count { get { return mErrors.Count; } }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know there have any other way that (by not using json_encode and
Does anyone know do there have any way that I can encrypt the array
Does anyone know if there is a way to get a list of all
Does anyone know if there is a way to get a list of dates
Does anyone know if there have been any changes in Azure publish to allow
Does anyone know a way to get list of jQuery themes from http://jquery-ui.googlecode.com/svn/tags/1.8.23/themes/ ?
Does anyone know of a way to get an entire list of search results
Does anyone know if there's a way to run automatically in shell a list
Does anyone know if there is a way I can get the XCode method/class
Does anyone know if there's a simple way to retrieve the list of models

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.