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

  • Thread starter Thread starter Mr Marsh
  • Start date Start date
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
 
Back
Top