Validator Text vs. ErrorMessage

Discussion in 'ASP .Net' started by Andy, Jul 14, 2009.

  1. Andy

    Andy Guest

    Hi,

    I'm trying to get the "no text" text display going with validators. I
    know that normally if Text is empty, it will use errormessage
    instead. I thought I found a way to trick the controls though, but
    setting Text to &nbsp. This actually seems to work... on one of my
    pages. On another page though, the ErrorMessage is still being
    displayed. If it were consistent, that'd be one thing... but what is
    going on here? If the validator smart enough to figure out that
      is empty??

    Thanks
    Andy
    Andy, Jul 14, 2009
    #1
    1. Advertising

  2. Andy

    Andy Guest

    On Jul 13, 9:36 pm, Andy <> wrote:
    > I'm trying to get the "no text" text display going with validators.  I
    > know that normally if Text is empty, it will use errormessage
    > instead.  I thought I found a way to trick the controls though, but
    > setting Text to &nbsp.  This actually seems to work... on one of my
    > pages.  On another page though, the ErrorMessage is still being
    > displayed.  If it were consistent, that'd be one thing... but what is
    > going on here?  If the validator smart enough to figure out that
    > &nbsp; is empty??


    I managed to get it working how I want, but I'd still like to know why
    it wasn't working with the &nbsp;. I simply made a css class where
    display was none and applied that to all the validators.
    Andy, Jul 14, 2009
    #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. Arjen
    Replies:
    2
    Views:
    344
    Michal A. Valasek
    Aug 2, 2003
  2. Roger Kjærnsrød
    Replies:
    1
    Views:
    466
    Peter Blum
    Sep 21, 2004
  3. JustMe
    Replies:
    0
    Views:
    425
    JustMe
    Oct 4, 2004
  4. Jacob Andersen

    Validator's ErrorMessage is decoded

    Jacob Andersen, Jun 24, 2010, in forum: ASP .Net
    Replies:
    3
    Views:
    1,011
    Sarath Babu S
    Jul 8, 2010
  5. David Thielen

    Validator - Text vs ErrorMessage

    David Thielen, May 28, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    118
    David Thielen
    May 28, 2006
Loading...

Share This Page