HTMLInputfile problem with VS2003

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
 
T

Teemu Keiski

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.
 
T

Teemu Keiski

Ah yes, very true, in MSDN docs there is that "There is no functionality
implemented for this property unless defined by the author"
 
G

Guest

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?
 
T

Teemu Keiski

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,951
Messages
2,570,113
Members
46,698
Latest member
alexxx

Latest Threads

Top