473,836 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1490
On Feb 25, 4:49 pm, Monica <Mon...@discuss ions.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
8870
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, *.html)'? TIA Andy
1
3329
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 transfer. I've put a fileupload control on the page to allow the user to specify the file. Now I want to push/pull the details to/from appsettings so the user doesn't have to browse to the file if it hasn't changed. However I can't set default...
2
2960
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 & onItemUpdating but no luck.. FindControl() didn't work and can't find my fileUpload control.. any help plzzzzzzzzzz?? I just upgraded to .net 2 and find to much problems with FindControl() in template controls.. and also i face too many problems...
4
9691
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> <asp:Button id="Upload" Text="Upload file" runat="server"> </asp:Button> <asp:Button id="Button1" OnClick="UploadButton_Click" runat="server" Visible="false"> in the code behind file I am using the following code to add the __doPostBack to the...
0
2059
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 this can be done for the win forms version of the dialog box. I understand that is displays the client side folder structure and not the server, and I know for a fact that the default location exists. What I need to do is intergrate my app...
1
1675
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 full path and file name) I want to press another button and get the path+file name as a string. I want to do this with out actually upload the file. I use the fileupload just for his browsing option.
0
1125
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
7545
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
8670
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, the HasFile=False, and the FileContent.Length=0. Why is this? Does it have something to do with the TabPanel and UpdatePanel being AJAX? If so, what can I do to fix it? Is there something else I could be doing wrong? Any help would be appreciated....
0
9816
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9668
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9371
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7790
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5823
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3112
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.