Home All Groups Group Topic Archive Search About

What is the code for file upload?

Author
18 Jan 2006 8:17 PM
Mark Sandfox
I have tried everyway i know both Input type=file and asp.net 2.0
asp:uploadfile and continue to run into road blocks at one point or another.

The objective is as follows:

Allow user to upload multiple files of a specific extension (i.e. .jpg).  In
addition to uploading to a specific directory, I need to extract the
filename and extension to store in a database (don't worry about the
database side).

I have tried UploadFile but get a parsing error on the <asp:UploadFile line.

I had input working except for restricting file extension type.

Any and all help will be greatly appreciated.

Thank you in advance for all you help.

Author
19 Jan 2006 10:12 AM
Wouter van Vugt
Hi Mark,

can you be more specific about the errors you receive. The FileUpload
control is perfectly capable to upload a single file to the server (it
uses input type=file). Use more than 1 control to upload multiple
files. (or use
http://blogs.infosupport.com/wouterv/archive/2005/10/08/1409.aspx)

Grtz, Wouter van Vugt
Trainer - Info Support
Author
19 Jan 2006 6:49 PM
Doug Salomon
I don't know if this will help, but I just read a pretty decent article on
how to do file uploads on MSDN.

Here's the URL : http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/UploadASP2.asp

Doug


Show quoteHide quote
"Mark Sandfox" wrote:

> I have tried everyway i know both Input type=file and asp.net 2.0
> asp:uploadfile and continue to run into road blocks at one point or another.
>
> The objective is as follows:
>
> Allow user to upload multiple files of a specific extension (i.e. .jpg).  In
> addition to uploading to a specific directory, I need to extract the
> filename and extension to store in a database (don't worry about the
> database side).
>
> I have tried UploadFile but get a parsing error on the <asp:UploadFile line.
>
> I had input working except for restricting file extension type.
>
> Any and all help will be greatly appreciated.
>
> Thank you in advance for all you help.
>
>
>