ASP.NET 2005:  How- File Upload input mask

Posted on 2008-02-01
Medium Priority
Last Modified: 2013-11-26
Using a file upload control, how do I set an input mask so that it will only "browse" files that contain:  .jpg, .jpeg, .gif  ?

Question by:arthurh88
1 Comment

Accepted Solution

sasapopovic earned 2000 total points
ID: 20800302
Hello arthurh88,

You can not set such option for <input type=file... control.

What you can do is to add an onChange event handler on client side and check selected extension on client side before file is uploaded to server. Here is an example of how to do that: http://www.codestore.net/store.nsf/unid/DOMM-4Q8H9E

Another solution is to write your own (or find an existing) ActiveX, Applet, Flash or similar control.


Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
There is a wide range of advantages associated with the use of ASP.NET. This is why this programming framework is used to create excellent enterprise-class websites, technologies, and web applications.
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Through the video, you can check the migration process of Outlook PST file to PDF. Kernel for Outlook to PDF tool can convert Outlook emails with all attributes like Subject, To, From, Cc, Bcc and other folders such as Inbox, Outbox, Sent Items, Jun…

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question