Validator does'nt work!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Arjen

    #1

    Validator does'nt work!

    Hello,

    Here is my file input field:
    <INPUT id="ImageFileUp load" style="WIDTH: 353px" type="file"
    name="XmlFileUp load" runat="server" width="300" cssclass="Norma lTextBox">

    Here is my validator:
    <asp:RequiredFi eldValidator Display="Static " id="RequiredSrc " runat="server"
    ControlToValida te="ImageFileUp load" CssClass="Norma lRed" />

    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

    #2
    Re: Validator does'nt work!

    I believe

    <asp:RequiredFi eldValidator

    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@hotmai l.com> wrote in message
    news:bgemu1$j40 $1@news2.tilbu1 .nb.home.nl...[color=blue]
    > Hello,
    >
    > Here is my file input field:
    > <INPUT id="ImageFileUp load" style="WIDTH: 353px" type="file"
    > name="XmlFileUp load" runat="server" width="300" cssclass="Norma lTextBox">
    >
    > Here is my validator:
    > <asp:RequiredFi eldValidator Display="Static " id="RequiredSrc "[/color]
    runat="server"[color=blue]
    > ControlToValida te="ImageFileUp load" CssClass="Norma lRed" />
    >
    > 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!
    >
    >[/color]


    Comment

    Working...