HTMLInputfile problem with VS2003

  • Thread starter Thread starter John Mason
  • Start date Start date
J

John Mason

I am using VS 2003 and the accept parameter neither comes
up in intellisense nor restricts the file types. Is this a
bug?
This is how the form is defined -
<form id="frmBreaks" method="post" runat="server"
enctype="multipart/form-data">

This is how the control is defined -
<INPUT id="inpFile1" type="file" name="inpFile1"
runat="server">

If I try to add the 'accept' property I have to do it by
hand as intellisense doesn't include it. When I do, I get
a red wavy line and the error "'Could not find any
attribute 'accept' of element 'input'".

If I add the property programatically, it seems to be
accepted, but it still doesn't restrict file type.

Anyone got an idea?

TIA, John
 
Hi,

even if VS.NET shows that as red line, it doesn't prevent from using it.
VS.NEt's Intellisense ain't perfect either. Just ignore the message.
 
Ah yes, very true, in MSDN docs there is that "There is no functionality
implemented for this property unless defined by the author"
 
Well, thanks for the responses guys but I'm still unable
to filter.
When I click the browse button on the control I just
get 'Files of Type: All Files (*.*)'
Am I to assume then that IE6 doesn't support this
functionality?
 
Hi,

I believe you should try to do that filtering at the server.

Via the PostedFile.ContentType property of HtmlInputFile you can try to
check the type at the server.
 
Back
Top