Required field validator not working

Discussion in 'ASP .Net' started by SteFetS, Jul 6, 2005.

  1. SteFetS

    SteFetS Guest

    Here is my bug

    On my Webform I have

    1 Panel with a textbox in it
    1 Required field (outside the panel) for the textbox
    1 Button (outside the panel)

    The panel is set to VISIBLE=FALSE

    If I click the button, the Required field validator is not working before
    the post... It works when the page reload !!!

    If the Panel is visible, all work fine :eek:)

    Why ?

    Stef
     
    SteFetS, Jul 6, 2005
    #1
    1. Advertising

  2. SteFetS

    Marina Guest

    That is because if the panel is visible, no HTML is rendered for either the
    panel or anything in it. So that means there is no textbox - so nothing to
    validate.

    You can check the HTML to see exactly what is streamed to the browser to see
    this. In fact, this is a good idea when these types of issues come up.

    "SteFetS" <> wrote in message
    news:Xns968B8FD296C19NOSPAMgagnonshotmail@207.35.177.135...
    > Here is my bug
    >
    > On my Webform I have
    >
    > 1 Panel with a textbox in it
    > 1 Required field (outside the panel) for the textbox
    > 1 Button (outside the panel)
    >
    > The panel is set to VISIBLE=FALSE
    >
    > If I click the button, the Required field validator is not working before
    > the post... It works when the page reload !!!
    >
    > If the Panel is visible, all work fine :eek:)
    >
    > Why ?
    >
    > Stef
    >
     
    Marina, Jul 6, 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. Milan
    Replies:
    4
    Views:
    12,165
    =?Utf-8?B?TWlsYW4=?=
    Aug 24, 2004
  2. Ratman
    Replies:
    0
    Views:
    710
    Ratman
    Sep 14, 2004
  3. =?Utf-8?B?QXNoYQ==?=

    required field validator not working for checkbox.

    =?Utf-8?B?QXNoYQ==?=, Oct 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    15,160
    Peter Blum
    Oct 15, 2004
  4. Santosh
    Replies:
    0
    Views:
    1,507
    Santosh
    Aug 24, 2006
  5. jr
    Replies:
    3
    Views:
    493
Loading...

Share This Page