473,398 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Fileupload extension

Hi folks

Is it possible to restrict the types of files which can be selected when the
user clicks the "Browse" button (e.g. ".jpg, .gif" only)?

Thanks
Will
Mar 15 '06 #1
2 1191
The easiest way to validate filenames before upload is by using the
validation controls.
Here's more info:
http://SteveOrr.net/articles/Validation.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"William Buchanan" <wi**************@freenet.co.uk> wrote in message
news:OO****************@TK2MSFTNGP09.phx.gbl...
Hi folks

Is it possible to restrict the types of files which can be selected when
the user clicks the "Browse" button (e.g. ".jpg, .gif" only)?

Thanks
Will

Mar 15 '06 #2
Perfect!

Many thanks
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:eL**************@TK2MSFTNGP09.phx.gbl...
The easiest way to validate filenames before upload is by using the
validation controls.
Here's more info:
http://SteveOrr.net/articles/Validation.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"William Buchanan" <wi**************@freenet.co.uk> wrote in message
news:OO****************@TK2MSFTNGP09.phx.gbl...
Hi folks

Is it possible to restrict the types of files which can be selected when
the user clicks the "Browse" button (e.g. ".jpg, .gif" only)?

Thanks
Will


Mar 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: ad | last post by:
How can we assign file extension using FileUpload?
2
by: Islamegy® | last post by:
I'm use FormView for editing a photo gallery... I add FileUpload control to upload images to the Gallery. I'm binding my Formview to objectdatasource i tried upload images onItemInserting &...
1
by: Marko Vuksanovic | last post by:
I am trying to implement an upload progress indicator using atlas, using the following workaround: http://forums.asp.net/thread/1321664.aspx This is the code in FileUpload.apsx file is as...
12
by: Phil Z. | last post by:
After migrating an ASP.NET 1.1 application to 2.0 we were getting "Cannot access a closed file" errors when uploading. I found a number of post on the subject and have since moved from using an...
0
by: Christian Schlemmer | last post by:
If my code will run into the filesize-limit condition, the INSERT-statement will be executed. is there a way to avoid that? Protected Sub DetailsView1_RowInserting(ByVal sender As Object,...
4
by: Dave | last post by:
If you had a FileUpload control inside of a FormView...how would you use FindControl to access the FileUpload properties? Let me just say that...
3
by: rn5a | last post by:
The ASPX FileUpload control displays a TextBox along with a 'Browse...' Button. Setting the different properties of this control just reflects the changes in the TextBox but not the Button. For...
2
by: =?Utf-8?B?TW9uaWNh?= | last post by:
Hi, I want when I click on Browse button (FileUpload Control), I see just image extensions not anything else. How can I do this? Thanks, Monica
1
by: bkeller81 | last post by:
Forgive me if this has been posted but I could not find an answer. I am using <asp:FileUpload ID="FileUpload1" runat="server" /> to allow a user to select a file from their computer. I need is the...
3
by: Rory Becker | last post by:
Is there any way to tell the FileUpload control to produce a clientside dialog with a particular filespec filter on it. For example I would like to restrict users to only uploading pdf files. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.