ValidationSummary reuse

Discussion in 'ASP .Net Web Controls' started by Jeronimo Bertran, Feb 26, 2005.

  1. I have a we page that uses Validators and a ValidationSummary to show the
    results. However, after all input fields are verified I do additional
    verification on the server side and if there was a problem that cannot be
    determined by the validators I show the error in much the same way as the
    validators do. Can I use the same ValidationSummary control to display a
    validation error in this case?

    Thanks

    Jeronimo
    Jeronimo Bertran, Feb 26, 2005
    #1
    1. Advertising

  2. Hi Jeronimo,

    We have reviewed this issue and are currently researching on it. We will
    update you ASAP. Thanks for your patience!

    Kevin Yu
    =======
    "This posting is provided "AS IS" with no warranties, and confers no
    rights."
    Kevin Yu [MSFT], Feb 26, 2005
    #2
    1. Advertising

  3. Hi Jeronimo,

    Welcome to ASPNET newsgroup. From your description, the problem you met is
    how to reuse the ValidatioSummary control to display error message when
    your custom validation operations complete at serverside, yes?

    From my research, the ValidationSummary control is tightly bind with the
    asp.net validation controls , there is no exsiting interfaces to manually
    invoke its displaying. However, we can make use of the CustomValidator
    conttrol which can help do our custom validation operatios( in its
    "ServerValidate" event).
    So we can add a custom validation control on the page(turn off client
    validation) and put our own validation
    code in "ServerValidate" event. When the validation fails, just set the
    ServerValidateEventArgs.IsValid to "false", the ValicationSummary will
    displaying the error message of the CustomValication control.

    HTH. Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Steven Cheng[MSFT], Feb 28, 2005
    #3
  4. Steven, thanks... this will work fine.

    Jeronimo

    (Steven Cheng[MSFT]) wrote in
    news::

    > Hi Jeronimo,
    >
    > Welcome to ASPNET newsgroup. From your description, the problem you
    > met is how to reuse the ValidatioSummary control to display error
    > message when your custom validation operations complete at serverside,
    > yes?
    >
    > From my research, the ValidationSummary control is tightly bind with
    > the asp.net validation controls , there is no exsiting interfaces to
    > manually invoke its displaying. However, we can make use of the
    > CustomValidator conttrol which can help do our custom validation
    > operatios( in its "ServerValidate" event).
    > So we can add a custom validation control on the page(turn off client
    > validation) and put our own validation
    > code in "ServerValidate" event. When the validation fails, just set
    > the ServerValidateEventArgs.IsValid to "false", the ValicationSummary
    > will displaying the error message of the CustomValication control.
    >
    > HTH. Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
    >
    >
    Jeronimo Bertran, Mar 2, 2005
    #4
  5. You're welcome Jeronimo,

    Enjoy .NET :)


    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Steven Cheng[MSFT], Mar 3, 2005
    #5
    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:
    444
    John Mabbott
    Jun 27, 2003
  2. tshad
    Replies:
    5
    Views:
    518
    Steve C. Orr [MVP, MCSD]
    May 17, 2005
  3. Hylander

    To reuse or not to reuse....

    Hylander, Feb 26, 2004, in forum: Java
    Replies:
    0
    Views:
    412
    Hylander
    Feb 26, 2004
  4. code reuse and design reuse

    , Feb 7, 2006, in forum: C Programming
    Replies:
    16
    Views:
    1,005
    Malcolm
    Feb 12, 2006
  5. jacob navia

    To reuse or not to reuse

    jacob navia, Nov 5, 2006, in forum: C Programming
    Replies:
    19
    Views:
    515
    Dave Thompson
    Dec 18, 2006
Loading...

Share This Page