Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Validator does'nt work!

Reply
Thread Tools

Validator does'nt work!

 
 
Arjen
Guest
Posts: n/a
 
      08-01-2003
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!


 
Reply With Quote
 
 
 
 
Leeor Geva
Guest
Posts: n/a
 
      08-02-2003
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" <(E-Mail Removed)> wrote in message
news:bgemu1$j40$(E-Mail Removed)1.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!
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Struts Validator - creditCard validator smrimell@gmail.com Java 4 02-13-2007 08:32 PM
Where to find Validator component in Visual Studio.NET jacksu MCSD 2 02-20-2004 04:56 PM
how to connect a validator programmatically to a bound datagrid Mark Kamoski ASP .Net 0 07-16-2003 10:19 PM
Validator controls and usercontrols Antonio Maciel ASP .Net 0 07-09-2003 12:34 PM
Custom Validator Serdar Kalaycę ASP .Net 1 07-08-2003 01:36 PM



Advertisments