Adding Filter Action to FileUpload Control of ASP.NET 2.0
page 1 of 6
Published: 03 Apr 2008
Abstract
In this article, Soyuj explains the logic to implement the ASP.NET 2.0 FileUpload Control for adding the ability to filter files. After a brief introduction, he discusses both the client and server side approaches with the help of source code. At the end of the article Soyuj also provides a few useful references to learn more about the discussed topic.
by Soyuj Kumar Sahoo
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 8778/ 760

Introduction

When we need to Upload any file in to our system we need the Browse and Upload action. In the case of Windows application of .NET there is a control called OpenFileDialog which is used for Uploading any file with browsing. Here we can get the file filter action by using the Filter property. For example, we have to Upload only the test files into our system, so we can set the filtering action as: (OpenFileDialog)Object.Filter = "Text files|*.txt; *.doc; *.rtf" in Windows Application of .NET.

So, when windows developers need this type of filtering action in Web Application, they have a option of using asp:FileUpload control of ASP.NET. Unfortunately, we which have no such property to set a filter for doing the file filtering action before Uploading. So we need to develop our own logic to achieve our Objective.

To get the filtering action we have two options in Web Application:  Client side action and Server side action. In this article we will discuss both the possible ways with a step-by-step example to add the file filtering logic in our application.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 1 and 2 and type the answer here:

User Comments

Title: Good   
Name: Mr.6
Date: 7/1/2008 2:38:23 AM
Comment:
this article is very good.
Title: Good article   
Name: Mehul Bhuva
Date: 4/9/2008 6:53:20 AM
Comment:
It is a nice article..Keep it up
Title: Excellent Work   
Name: ali raza
Date: 4/8/2008 7:40:38 AM
Comment:
nice article, keep working
Title: File Filters   
Name: Haissam Abdul Malak
Date: 4/3/2008 2:00:41 AM
Comment:
Good article. However, you can use flash and ASP.NET to set the file filters on the open dialog box itself and to upload multiple files at one.
http://dotnetslackers.com/community/blogs/haissam/archive/2008/03/29/upload-multiple-files-using-asp-net-amp-adobe-flex.aspx

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 7/5/2008 7:28:34 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search