473,399 Members | 2,159 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,399 software developers and data experts.

Limiting a file browser to certain application-content types

I have found plenty of examples of how to test for content type after
the user has clicked "Browse" when implementing the "File" object on an
ASPx page.

But I would like to limit the dropdown itself in the "Choose file"
dialog. The "Files of Type" dropdown always has "All Files (*.*),
Pictures (*.gif, *.jpg), HMTL (*.htm, *.html)" and nothing I do changes
that.

Thought it would be changing the aspx file to read something like this:

<INPUT id="File1" style="Z-INDEX: 103; LEFT: 8px; WIDTH: 536px;
POSITION: absolute; TOP: 45px; HEIGHT: 22px" type="file" size="70"
name="File1" accept="application/*" runat="server">

I added the 'accept="application/*" ' part.

Any ideas? Thanks.

Jul 12 '06 #1
3 1131
You can't control that dialog box. It is implememented by browser.

"Doug" <sp*******@gmail.comwrote in message
news:11*********************@35g2000cwc.googlegrou ps.com...
>I have found plenty of examples of how to test for content type after
the user has clicked "Browse" when implementing the "File" object on an
ASPx page.

But I would like to limit the dropdown itself in the "Choose file"
dialog. The "Files of Type" dropdown always has "All Files (*.*),
Pictures (*.gif, *.jpg), HMTL (*.htm, *.html)" and nothing I do changes
that.

Thought it would be changing the aspx file to read something like this:

<INPUT id="File1" style="Z-INDEX: 103; LEFT: 8px; WIDTH: 536px;
POSITION: absolute; TOP: 45px; HEIGHT: 22px" type="file" size="70"
name="File1" accept="application/*" runat="server">

I added the 'accept="application/*" ' part.

Any ideas? Thanks.

Jul 12 '06 #2
Doug,
In Internet Explorer, the <INPUT TYPE="FILE" HTML control offers some of the
built-in behaviors, such as browsing to a folder list, but it does not offer
a way to set file-extension filters as does the Windows version.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Doug" wrote:
I have found plenty of examples of how to test for content type after
the user has clicked "Browse" when implementing the "File" object on an
ASPx page.

But I would like to limit the dropdown itself in the "Choose file"
dialog. The "Files of Type" dropdown always has "All Files (*.*),
Pictures (*.gif, *.jpg), HMTL (*.htm, *.html)" and nothing I do changes
that.

Thought it would be changing the aspx file to read something like this:

<INPUT id="File1" style="Z-INDEX: 103; LEFT: 8px; WIDTH: 536px;
POSITION: absolute; TOP: 45px; HEIGHT: 22px" type="file" size="70"
name="File1" accept="application/*" runat="server">

I added the 'accept="application/*" ' part.

Any ideas? Thanks.

Jul 12 '06 #3
Thank you both. I guess I was reading Windows documentation instead of
web browser/IE docs. Seems like it would be a good thing to include.

Jul 12 '06 #4

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

Similar topics

4
by: Adam | last post by:
Greetings, I am creating a web application, which I will be selling licenses to be able to use it. So Customer Group A, could purchase 3 licenses, Customer Group B could purchase 30. With...
4
by: Rob | last post by:
I have an Access application that allows users to open up certain files from within Access (.doc files with automation, .pdf's with a pdf viewing form). Other formats, we want to use Internet...
2
by: Jo Davis | last post by:
access fe and access be. later the be might be sql server I don't want people to pass this application around. And I want control over usage. I want it to 'expire' after a while. I have fairly...
5
by: randyelliott | last post by:
Good Day, I have a MS Access (Access 2000 now upgraded to 2003) database that tracks customer information. One function of this database is to create an encrypted license file for our software,...
0
by: Igor | last post by:
I need to implement the following download functionality in the browser. When users request a certain operation from the web application, certain files are downloaded to their PCs, into a certain...
5
by: Dave Taylor | last post by:
I have an old ASP application that I'm converting to ASPNET. The application allows users to login, enter data, and run simulations on our computers and the results are stored in a file the user...
4
by: sunilj20 | last post by:
Hello, I have a requirement wherein, a user clicks on a file name in an ASP.NET web application, and the file should automatically be downloaded (Without showing the "Open", "Save As") in the...
7
by: tarun.kataria | last post by:
Hi All, Is there any way to detect that the user is trying to Xout the browser window instead of hitting a button. Because in my application I want to make it sure that they dont do it either...
9
by: Morris Neuman | last post by:
Im working with VS 2005 and trying to use a Hyperlink field in a datagrid to play a wave file that is not located in the website folders but is in a plain folder on the same machine, windows 2003...
12
by: Geoff Cox | last post by:
Hello I'm having a problem loading a frameset file using an include in a php file. Nothing is displayed and when I look at the source code I see that <html> <head> <title></title>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.