Home > Microsoft .Net Development Tips > ASP.NET Development > Using the File Field control to upload files
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ASP.NET DEVELOPMENT

Using the File Field control to upload files


Ed Tittel
03.09.2004
Rating: -3.25- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


The Microsoft ASP.NET File Field control permits end users to upload one or more files from their desktops to your servers. A recent article in the MS Visual Studio Developer Center provides all the gory details about this tool including code samples, but I provide a 10,000-foot view and some interesting pointers here.

ASP.NET Web forms are designed to permit communications with end users about the kind of data they must supply to perform specific tasks, or to interact with various custom applications. When such interactions involve data that is not simple text, a file upload control can be of significant value to developers. That's why ASP.NET makes it easy to upload files or documents to a server, and where the File Field control comes into play.

The File Field control makes use of the HtmlInputFile class, and supplies mechanisms to control file uploads to a server from client computers. This control is named File Field in versions of Visual Studio.NET, but is known as the FileUpload control in the ASP.NET Web matrix. Either way, you'll find this control in the HTML section of the Toolbox you'll use.

Simply put, the File Field control permits the HTML &l


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
ASP.NET Development
How to use jQuery to solve Javascript browser compatibility problems
How to write an out-of-browser Silverlight 3 application in 3 steps
Silverlight 3 beta SDK download lets developers try new RIA features
Visual Studio's IntelliSense for jQuery doesn't autocomplete correctly
Dundas Map for .NET kicks up geographic visualization
Return to CodePlex: Into the Sandcastle…
VBScript Tutorial
Use PHP with Visual Studio to create Web sites
Visual Studio Team System Add-ins: Conchango Scrum for Team System and Scrum Dashboard
Visual Studio 2008 and .NET Framework 3.5 SP1 introduces ADO .NET Entity Designer

ASP.NET development best practices
Introduction to ASP.NET's Model View Controller (MVC) Design Pattern
Silverlight, Ajax components require different approach to UI
LINQ Learning Guide: LINQ and Web applications
VB code download home page
VB code: File manipulation downloads
Localization practices for .NET 2.0: It's still about the architecture
Creating custom ASP.NET 2.0 profile providers
.NET development in the trenches
Microsoft developers balancing age-old issues, barrage of new technology
SearchVB.com's Podcast Page

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
136 browser colors with names  (SearchWinDevelopment.com)
ASP.NET  (SearchWinDevelopment.com)
browser  (SearchWinDevelopment.com)
Document Object Model  (SearchWinDevelopment.com)
domain name  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


t;input type="file"> element to be programmed, and is used to identify file data within an HTML form. Previous implementations of ASP.NET often required third-party tools to handle this job, but with access to .NET environment and the File Field control, uploading is a piece of cake. The Visual Studio Developer Center article provides detailed code listings that show exactly how to use this control in Visual Basic and Visual C#.

If that code is used, it permits easy selection and upload controls for files simply by clicking an Upload File button on a Web page that includes that code. The MS article also explains how to set file permissions to make sure that end users can deposit files in whatever target directory you specify. It's great when MS makes such important, frequently used activities so easy to include in your code. Check out the article and code samples and you'll see just how simple and straightforward this really is!


Ed Tittel is a full-time writer and trainer whose interests include XML and development topics, along with IT Certification and information security topics. E-mail Ed at etittel@lanw.com with comments, questions, or suggested topics or tools to review.


Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts