Problem using 'accept="image/*"' in the input tag in visual studio

M

Mr Marsh

Howdy, I need to be able to restrict the type of files that a user can
upload, specifically I only want them to be able to upload images. I'm
using the following line of html

<INPUT accept="image/*" id="logo" type="file" runat="server"/>

but I get the following error:

Could not find any attribute 'accept' of element 'input'.

All the microsoft documentation suggests that I have the syntax
correct but my compiled programme lets you upload any file type.

I am using Visual Studio and I'm coding in C#.

hmm - any suggestion please.

thanks

Peter
 
B

bruce barker

few browsers including IE support the accept attribute.

-- bruce (sqlwork.com)
 

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,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top