473,394 Members | 1,706 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,394 software developers and data experts.

FileUpload control - How to limit 'Files of Type'?

How do you limit the "Files of Type" selections in the dialog for a
FileUpload control?
Jan 18 '06 #1
1 1497
FYI: Here's one way...

<asp:RegularExpressionValidator
id="RegularExpressionValidator1" runat="server"
ErrorMessage="Bad file type..."
ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.mpeg|.MPEG|.wmv|.WMV|.avi|.AVI|.mov|.MOV)$" ControlToValidate="FileUpload1"></asp:RegularExpressionValidator>"VB Programmer" <do**@emailme.com> wrote in messagenews:OX**************@TK2MSFTNGP14.phx.gbl. ..> How do you limit the "Files of Type" selections in the dialog for aFileUpload control?>

Jan 18 '06 #2

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

Similar topics

5
by: Uncle Ben | last post by:
How strong and reliable is the new ASP.NET 2.0 FileUpload control? By that, I mean is it reliable enough to accept 2-gigabyte file uploads per upload session? Also, is it possible or easy to...
4
by: ad | last post by:
Have there any limitation about the size of the file uploaded by FileUpload control?
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...
2
by: Paolo | last post by:
Hi to all, I have an error that drove me crazy. Try the following page that should only allow to upload a file: <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">...
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...
1
by: nicknack | last post by:
Hello. I would like to give my user the option to browse his files (like the simple fileUpload control do) and after selecting the file (and when the fileUpload control hold in his text box the...
10
by: JoeP | last post by:
Hi All, I am using the FileUpload control for the ASPX page. How do you disable the text box portion of that control, so I can force the user only to pick up a file via the Browser button, and...
2
by: miladhatam | last post by:
hi i want make a page that users can upload their picture but my problem : how can i dynamically add this control cos i want that they can upload every pic they have and like gmail if you browse...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.