Validator does'nt work!

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

  1. #1

    Default Validator does'nt work!

    Hello,

    Here is my file input field:
    <INPUT id="ImageFileUpload" style="WIDTH: 353px" type="file"
    name="XmlFileUpload" runat="server" width="300" cssclass="NormalTextBox">

    Here is my validator:
    <asp:RequiredFieldValidator Display="Static" id="RequiredSrc" runat="server"
    ControlToValidate="ImageFileUpload" CssClass="NormalRed" />

    I select a file and the validator comes with the error messeage.
    Why??? It only should do the when there is no file selected!

    Can somebody help me?

    Thanks!


    Arjen Guest

  2. Similar Questions and Discussions

    1. application does'nt load
      Hello The following server-side script is saved as chooseflv.asc in a folder named chooseflv on the server side. I also created a streams folder...
    2. Win2003 Does'nt See Multiprocessors
      I just installed Win2K3 Ent. Server on a quad CPU Compaq Proliant 6500 server. During boot-up the BIOS reports all four CPUs with their speed and...
    3. "Select" & "Order By" OK- ''WHERE'' Does'nt Work !
      Before i post actual code, as i need a speedyish reply. Can i first ask if anyone knows off the top of their head, if there is a likely obvious...
    4. Why IO#readlines does'nt accept a Regexp?
      as in the subject, I just noticed that readlines just accepts a string as line Separator, and I wonder why it works this way. Some explanations? ...
    5. WHENEVER SQLERROR does'nt always work
      On 26 Jun 2003 05:09:48 -0700, ni4ni@hotmail.com (Guy) wrote: Why catch parsing errors? Your scripts are static aren't they? Just correct the...
  3. #2

    Default Re: Validator does'nt work!

    I believe

    <asp:RequiredFieldValidator

    will only work with an

    <asp:TextBox

    and not your HTML <Input

    This is also because you can use the validator in code-behind.

    -Leeor

    "Arjen" <boah123@hotmail.com> wrote in message
    news:bgemu1$j40$1@news2.tilbu1.nb.home.nl...
    > Hello,
    >
    > Here is my file input field:
    > <INPUT id="ImageFileUpload" style="WIDTH: 353px" type="file"
    > name="XmlFileUpload" runat="server" width="300" cssclass="NormalTextBox">
    >
    > Here is my validator:
    > <asp:RequiredFieldValidator Display="Static" id="RequiredSrc"
    runat="server"
    > ControlToValidate="ImageFileUpload" CssClass="NormalRed" />
    >
    > I select a file and the validator comes with the error messeage.
    > Why??? It only should do the when there is no file selected!
    >
    > Can somebody help me?
    >
    > Thanks!
    >
    >

    Leeor Geva 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