Question about RequiredFieldValidator

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Question about RequiredFieldValidator

    I've created a simple form with a submit button and a textfield. I
    assigned a RequiredFieldValidator to the textfield and set
    EnabledClientScript to ture. I noticed the validator did not display
    the error message if the textfield was empty. It seems to me that the
    client side validation script did not executed. After I pressed the
    submit button, the validator displayed the error message. I tried
    entering and clearing the textfield without pressing the submit button
    and everything worked as described in the documentation. So my
    question is why isn't the client side validation work the first time
    (before pressing the submit button)? Is this by desgin?
    pc Guest

  2. Similar Questions and Discussions

    1. ValidatorTrim(s) & RequiredFieldValidator bug w/Windows XP SP2 and IE SP2
      Ever since I upgraded to Windows XP SP2, I started noticing that the RequiredFieldValidator on a textbox on one of my ASP.Net pages was taking a...
    2. How to learn the base class: RequiredFieldValidator?
      Folks, I am trying to extend the RequiredFieldValidator control. What I am trying to accomplish should be mindlessly simple: if the...
    3. Using RequiredFieldValidator in FooterTemplate
      Hi, I'm having pasted below when trying to use a RequiredFieldValidtator(RFV) in the Footer Template. Here is a snipet of the code. Note that...
    4. Going crazy with requiredfieldvalidator controls . Kindly help me
      Hello friends... On a single asp.net web page i have a single server-side form that contains a couple of user-controls. Each user control has its...
    5. ASP:RequiredFieldValidator control is not working on Netscape 7.
      ASP:RequiredFieldValidator is not working on Netscape 7. Any one has idea how to fix this problem?
  3. #2

    Default Re: Question about RequiredFieldValidator

    Is it possible that the validator is detecting the browser as "downlevel" and
    therefore not emitting the client-side script? If the browser version isn't
    known to ASP.NET you may have problems like this.

    Is there any evidence of the client-side script when you view the source of a
    rendered page?

    Ken


    "pc" <peterchang_69@yahoo.com> wrote in message
    news:1e2f54c.0307271629.14a147d5@posting.google.co m...
    I've created a simple form with a submit button and a textfield. I
    assigned a RequiredFieldValidator to the textfield and set
    EnabledClientScript to ture. I noticed the validator did not display
    the error message if the textfield was empty. It seems to me that the
    client side validation script did not executed. After I pressed the
    submit button, the validator displayed the error message. I tried
    entering and clearing the textfield without pressing the submit button
    and everything worked as described in the documentation. So my
    question is why isn't the client side validation work the first time
    (before pressing the submit button)? Is this by desgin?


    Ken Cox [Microsoft MVP] Guest

  4. #3

    Default Re: Question about RequiredFieldValidator

    I'm using IE 6. I don't think it has anything to do with the browser. Client
    side validation work correctly after I pressed the submit button.

    "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
    news:eCAnmSKVDHA.2272@TK2MSFTNGP10.phx.gbl...
    > Is it possible that the validator is detecting the browser as "downlevel"
    and
    > therefore not emitting the client-side script? If the browser version
    isn't
    > known to ASP.NET you may have problems like this.
    >
    > Is there any evidence of the client-side script when you view the source
    of a
    > rendered page?
    >
    > Ken
    >
    >
    > "pc" <peterchang_69@yahoo.com> wrote in message
    > news:1e2f54c.0307271629.14a147d5@posting.google.co m...
    > I've created a simple form with a submit button and a textfield. I
    > assigned a RequiredFieldValidator to the textfield and set
    > EnabledClientScript to ture. I noticed the validator did not display
    > the error message if the textfield was empty. It seems to me that the
    > client side validation script did not executed. After I pressed the
    > submit button, the validator displayed the error message. I tried
    > entering and clearing the textfield without pressing the submit button
    > and everything worked as described in the documentation. So my
    > question is why isn't the client side validation work the first time
    > (before pressing the submit button)? Is this by desgin?
    >
    >

    Peter Chang Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139