473,394 Members | 1,641 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.

HtmlInputFile restrict file types

Hi

I'm trying to restrict file types with a HtmlInputFile Accept property. It
seems that this isn't supported for IE6? (doh!).

Can anyone recommend any free Upload components? Or a solution?

Cheers
Dan
Nov 19 '05 #1
2 1498
Why don't you just add javascript validation on the filename on the client
side and after they select the file you want, you can tell them it isn't
correct. I am assuming you want to limit to say... ".doc" files.

It was save from finding and installing various activeX controls.

bill

"dhnriverside" <da*@musoswire.com> wrote in message
news:8A**********************************@microsof t.com...
Hi

I'm trying to restrict file types with a HtmlInputFile Accept property. It
seems that this isn't supported for IE6? (doh!).

Can anyone recommend any free Upload components? Or a solution?

Cheers
Dan

Nov 19 '05 #2
Hi Bill

Yep, could do that, must admit to having not thought of that one. However,
I'd still prefer to limit the types of files the users can upload if possible.

I don't mind fiddling with a control, as long as it's free!

:o)
"William F. Robertson, Jr." wrote:
Why don't you just add javascript validation on the filename on the client
side and after they select the file you want, you can tell them it isn't
correct. I am assuming you want to limit to say... ".doc" files.

It was save from finding and installing various activeX controls.

bill

"dhnriverside" <da*@musoswire.com> wrote in message
news:8A**********************************@microsof t.com...
Hi

I'm trying to restrict file types with a HtmlInputFile Accept property. It
seems that this isn't supported for IE6? (doh!).

Can anyone recommend any free Upload components? Or a solution?

Cheers
Dan


Nov 19 '05 #3

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

Similar topics

5
by: John Mason | last post by:
I am using VS 2003 and the accept parameter neither comes up in intellisense nor restricts the file types. Is this a bug? This is how the form is defined - <form id="frmBreaks" method="post"...
5
by: shimonsim | last post by:
Hi, I need to upload pictures from client machine and I am using HtmlInputFile control I set validator to make sure that file has correct expention but if one of the files has incorrect extention...
5
by: Ariel Dolan | last post by:
Can I use HtmlInputFile to only get the selected file name but not actually upload the file? Clicking the control's Browse button let's the user select a file. All I need is the HtmlInputFile...
4
by: Chris | last post by:
I'm uploading files to a location on my server. It works fine accept, I can't seem to get the control over the max file size to upload and the types I want to only allow. Max file size = 50KB...
2
by: Augusto Cesar via DotNetMonster.com | last post by:
Hi, I want to customize the HtmlInputFile. I wanna something like an image button to play the "browse" button hole and hide the textbox. Is that possible? I also have tried to hide an...
2
by: Nayak | last post by:
On my web page, I want to let the user be able to browse for a file and select it. For this i have used HTMLInputFile Control. But here I want to restrict the type of the files the user can select....
7
by: Buddy Ackerman | last post by:
I created this class Public Class HTMLFileInput : Inherits System.Web.UI.HtmlControls.HtmlInputFile Public Property Data As String Get Return ViewState("HTMLFileInput.Data") End Get Set...
1
by: John Mason | last post by:
I'm trying to restrict the selection of files to jpg; gif etc. in an HtmlInputFile control. All the documentation says use the Access property but this doesn't work. It doesn't show up in...
1
by: Asela Gunawardena | last post by:
On my Web Servers, I don't want to allow visitors to upload executables. There are many types of files that i want to ignore (for instance: exe,dll, bat, cmd .etc). I have an ASPX page with an...
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
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.