Uploading Files Using a Webform
page 1 of 2
Published: 07 Jun 2004
Unedited - Community Contributed
Abstract
If you require a quick simple upload function for you web based application you can accomplish this action by using the System.IO namespace along with the default namespaces that are added when you create a webform within Visual Studio.NET
by Steven Swafford
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 32895/ 84

Building Your File Upload Webform

[Download Code]

Once you have added a new webform to your project you are ready to add the necessary components.

First, drag a file field component onto your web form. Second, drag a button on your web form. Finally, drag a label onto your web form. You can name each of these components as you desire. Once you have accomplished these steps you should see something along these lines:

Web Form Design

Now let us move on to the code that will process the file uploads.


View Entire Article

User Comments

Title: System.NullReferenceException: Object reference not set to an instance of an object.   
Name: Janet
Date: 2005-03-01 12:06:33 PM
Comment:
Hi.. I have converted the codes to vb.net. However, when the upload button is clicked i got the following error "System.NullReferenceException: Object reference not set to an instance of an object."

Could you help me out.. thanks
Title: Priner friendly version - followup   
Name: Steven
Date: 2004-12-09 5:22:16 PM
Comment:
If you look below there is a link for the printer friendly version. HTH....
Title: Priner friendly version   
Name: Jim@CSCsupport.com
Date: 2004-12-09 5:07:17 PM
Comment:
It would be nice if you would make a Printer Friendly option available on your site or if you limited the width of your program code lines so they would fit when I printed
your web page to my printer from a scren with a 1024X768
display setting. Otherwise I lose part of the code.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-03-26 9:08:51 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search