Multiple ValidationSummary controls.

Discussion in 'ASP .Net' started by Ken Varn, Mar 29, 2005.

  1. Ken Varn

    Ken Varn Guest

    If a page has multiple ValidationSummary controls, how does it distinguish
    which ValidationControls are associated with which ValidationSummary
    controls?

    The reason I am asking this is that I want to display a Message Box for the
    validation message on my Validation controls. My validation control is
    embedded within a custom server control. If my custom server control adds a
    ValidationSummary control, I am afraid that it may conflict with an existing
    ValidationSummary control if one exists on the page where the custom server
    control is placed.

    --
    -----------------------------------
    Ken Varn
    Senior Software Engineer
    Diebold Inc.

    EmailID = varnk
    Domain = Diebold.com
    -----------------------------------
     
    Ken Varn, Mar 29, 2005
    #1
    1. Advertising

  2. Ken Varn

    Peter Blum Guest

    By design, the ValidationSummary control collects ALL validator error
    messages on the page.

    My replacement to the ASP.NET validators, Professional Validation And More
    (http://www.peterblum.com/vam/home.aspx), provides a technique called
    Validation Groups. It lets you assign a group name to the submit button and
    the validators it fires. You can have multiple ValidationSummary controls on
    the page, each with its own Validation Group.

    If you are only trying to avoid having two validationsummaries on the page,
    you can have your UserControl check the parent control for the
    ValidationSummary and then set its own to Visible=false.

    --- Peter Blum
    www.PeterBlum.com
    Email:
    Creator of "Professional Validation And More" at
    http://www.peterblum.com/vam/home.aspx

    "Ken Varn" <nospam> wrote in message
    news:...
    > If a page has multiple ValidationSummary controls, how does it distinguish
    > which ValidationControls are associated with which ValidationSummary
    > controls?
    >
    > The reason I am asking this is that I want to display a Message Box for
    > the
    > validation message on my Validation controls. My validation control is
    > embedded within a custom server control. If my custom server control adds
    > a
    > ValidationSummary control, I am afraid that it may conflict with an
    > existing
    > ValidationSummary control if one exists on the page where the custom
    > server
    > control is placed.
    >
    > --
    > -----------------------------------
    > Ken Varn
    > Senior Software Engineer
    > Diebold Inc.
    >
    > EmailID = varnk
    > Domain = Diebold.com
    > -----------------------------------
    >
    >
     
    Peter Blum, Mar 30, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Mabbott

    ValidationSummary Disappearing Act!

    John Mabbott, Jun 27, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    467
    John Mabbott
    Jun 27, 2003
  2. Gandalf
    Replies:
    0
    Views:
    482
    Gandalf
    Aug 10, 2003
  3. NuB

    validationSummary controls

    NuB, Dec 20, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    666
  4. MattB
    Replies:
    0
    Views:
    516
    MattB
    Feb 3, 2006
  5. Phl
    Replies:
    0
    Views:
    120
Loading...

Share This Page