errorprovider with validationsummary

Posted on 2011-04-23
Last Modified: 2012-05-11
Webforms has a validationsummary that is connected to the validators. Is there any way to have errorprovider to send its error to a label for example instead of tootip?
Question by:Berico
    LVL 11

    Expert Comment

    You can enumerate the errors by looping though the control collection on your form. Won't be fast on big forms with loads of controls but will work.

    Add a label that you want the errors to be displayed on and write something like this:
    myErrorLabel.Text = string.Empty;
    foreach (Control ctrl in myErrorProvider.ContainerControl.Controls)
      myErrorLabel.Text += myErrorProvider.GetError(ctrl) + Environment.NewLine;

    Open in new window

    LVL 69

    Accepted Solution


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    In my previous two articles we discussed Binary Serialization ( and XML Serialization ( In this article we will try to know more about SOAP (Simple Object Acces…
    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now