473,399 Members | 2,278 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.

change default file extentions in FileUpload Control

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
Feb 25 '07 #1
2 1474
On Feb 25, 4:49 pm, Monica <Mon...@discussions.microsoft.comwrote:
Hi,

I want when I click on Browse button (FileUpload Control), I see just image
extensions not anything else.
No, you cannot. You can only check if selected file has correct
extension either by using validation controls, or on the server-side.

Check this:

Listing 3. Using validation controls to restrict the types of files
uploaded to the server
Listing 4. Checking the file type on the server
http://msdn2.microsoft.com/en-us/library/aa479405.aspx

Feb 25 '07 #2
I want when I click on Browse button (FileUpload Control), I see just
image
extensions not anything else.
Not possible. The File-dialog is browser specific and not HTML specific.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
Feb 26 '07 #3

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

Similar topics

3
by: Handy Andy | last post by:
Anyone know how to change the list of file types displayed by the asp:FileUpload control in its file selection dialog, or am I stuck with 'All Files(*.*) Pictures (*.gif, *.jpg) HTML (*.htm,...
1
by: David Norman | last post by:
I want to implement a repetitive admin function of kicking off an operation using a file that changes infrequently. All I'm interested in is the file name and path, I'm not performing any file...
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 &...
4
by: Marko Vuksanovic | last post by:
I am trying to cause the uplaod button, id="Upload",when clicked, to exectue the onClick event for Button1, id="Button1". <asp:FileUpload id="FileUpload" runat="server"> </asp:FileUpload>...
0
by: dieter grobler | last post by:
Hi there, I wanted to know if there is a way to specify the default location the OpenFileDialog shows when the browse button is pressed on the FileUpload Control. i.e "c:\program files\". I know...
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...
0
by: =?Utf-8?B?TW9uaWNh?= | last post by:
Hi, How can I change default file extensions in FileUpload Control (Using ASP.NET, Web site design)? Thank you in advance. Monica.
13
by: marathoner | last post by:
How do we invoke the file selection dialog? I would like to do this in C# in ASP.net. I would like to open a file for reading. Marathoner
3
by: Nathan Sokalski | last post by:
I have a FileUpload control which is inside an UpdatePanel which is inside a TabPanel. In my code, I use the FileUpload's HasFile and FileContent.Length properties. However, after I select a file,...
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...
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:
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
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
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.