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

Discussion in 'ASP .Net' started by Mr Marsh, Dec 2, 2003.

  1. Mr Marsh

    Mr Marsh Guest

    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
    Mr Marsh, Dec 2, 2003
    #1
    1. Advertising

  2. Mr Marsh

    bruce barker Guest

    few browsers including IE support the accept attribute.

    -- bruce (sqlwork.com)


    "Mr Marsh" <> wrote in message
    news:...
    > 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
    bruce barker, Dec 2, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wh
    Replies:
    2
    Views:
    509
    Cowboy \(Gregory A. Beamer\)
    Jan 16, 2004
  2. shruds
    Replies:
    1
    Views:
    786
    John C. Bollinger
    Jan 27, 2006
  3. Thirumalai
    Replies:
    0
    Views:
    653
    Thirumalai
    May 22, 2006
  4. rockdale
    Replies:
    1
    Views:
    600
    Juan T. Llibre
    Aug 23, 2006
  5. xman
    Replies:
    0
    Views:
    486
Loading...

Share This Page