Use validationSummary to display error message in user control

Discussion in 'ASP .Net' started by =?Utf-8?B?YzY3NjIyOA==?=, Jan 13, 2006.

  1. Hi,
    I have several user controls like email, phone,ssn etc. each has it's own
    validation message in its user control already.
    When I bring all those user controls in an aspx page, I would like to
    display a summary error messages using validation summary in an aspx page,
    how to do that?
    Thank you.
    --
    Betty
    =?Utf-8?B?YzY3NjIyOA==?=, Jan 13, 2006
    #1
    1. Advertising

  2. I am sorry, I didn't make that clear enough. What I mean to ask is if in a
    user control, I just used "*" as a default error message,which just to mark
    the field need to be corrected, but in a summary error message, I would like
    to give more detailed error message, is it dorable?
    --
    Betty


    "c676228" wrote:

    > Hi,
    > I have several user controls like email, phone,ssn etc. each has it's own
    > validation message in its user control already.
    > When I bring all those user controls in an aspx page, I would like to
    > display a summary error messages using validation summary in an aspx page,
    > how to do that?
    > Thank you.
    > --
    > Betty
    =?Utf-8?B?YzY3NjIyOA==?=, Jan 13, 2006
    #2
    1. Advertising

  3. http://msdn.microsoft.com/library/d...ntrolsbasevalidatorclasserrormessagetopic.asp


    A quote from the above link:

    "Use the ErrorMessage property to specify the text to display in the
    validation control when validation fails. This text is also included in the
    ValidationSummary control, if one is placed on the Web page.

    It is possible to display different text for the validation control and the
    ValidationSummary control. Use the Text property to specify the text to
    display in the validation control.

    Note If the Text property is set, that text will override the text
    specified in the ErrorMessage property and appear in the validation control.
    However, the text specified by the ErrorMessage property always appears in
    the ValidationSummary control."

    --
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "c676228" wrote:

    > I am sorry, I didn't make that clear enough. What I mean to ask is if in a
    > user control, I just used "*" as a default error message,which just to mark
    > the field need to be corrected, but in a summary error message, I would like
    > to give more detailed error message, is it dorable?
    > --
    > Betty
    >
    >
    > "c676228" wrote:
    >
    > > Hi,
    > > I have several user controls like email, phone,ssn etc. each has it's own
    > > validation message in its user control already.
    > > When I bring all those user controls in an aspx page, I would like to
    > > display a summary error messages using validation summary in an aspx page,
    > > how to do that?
    > > Thank you.
    > > --
    > > Betty
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=, Jan 13, 2006
    #3
    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. =?Utf-8?B?bWc=?=
    Replies:
    1
    Views:
    406
    Peter Blum
    Apr 5, 2004
  2. dsmportal
    Replies:
    0
    Views:
    537
    dsmportal
    Oct 25, 2006
  3. marc

    ValidationSummary doesn't get nested control error message

    marc, Feb 4, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    191
    Alessandro Zifiglio
    Feb 5, 2004
  4. Markus
    Replies:
    0
    Views:
    584
    Markus
    Mar 2, 2005
  5. Fabiano
    Replies:
    0
    Views:
    112
    Fabiano
    Aug 23, 2004
Loading...

Share This Page