• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 678
  • Last Modified:

Can I upload files to a server using ASP.NET programming, if so, is ASP.NET the best way to do this?

I am a contractor who has been assigned the task of uploading files to a server via the web. What is the best way to program this in ASP.NET? I have some experience with ASP.NET, but a lot of ASP classic experience. I was just wondering if it would be easiest to program this in ASP.NET? If so, how would I best do this? I have to be able to associate a logged on user with the newly uploaded files. The uploaded files would be saved in a file management system, each user having a folder for their uploaded files. The database would save information about the uploaded files for a specific person....(the name of the files etc.(not in a blob field))...and then the user would have to be able to view a list of their files that they have uploaded in an asp page, click on them and view them. I also have to be able to do a virus scan on the uploaded files.
Can someone suggest if this is all possible using ASP.NET, and if so, point me to some examples or give me some tips on the best way to get started?
Thanks.
0
bolenka
Asked:
bolenka
3 Solutions
 
abuckheitCommented:
yes it is very possible.. i would start here:

http://www.codeproject.com/aspnet/fileupload.asp

and also here:

http://www.developer.com/net/asp/article.php/3097661

i used those articles for a similar asp.net project.
0
 
lorelogicCommented:
You can use the ASP.NET FileUpload Web Server Control. Here are some links that explain how to use it with some examples to get started:

FileUpload Web Server Control Overview
http://msdn2.microsoft.com/en-us/library/ms227677(VS.80).aspx

How to Upload Files with the FileUpload Web Server Control
http://msdn2.microsoft.com/en-us/library/ms227669(vs.80).aspx

0
 
bolenkaAuthor Commented:
That is great, I have already looked at one of those articles. Thanks so much. The second article talks about saving the uploaded files to a database....is it possible to not save them to the database, but to a folder on the server and then virus scan them? I would like to save them to the db, but this particular project requires me to save them to a file on the server. Can I also do this using ASP.NET? If so, do you happen to know of any code that will do that and then allow me to search the folders to retrieve the files into a datalist control?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
abuckheitCommented:
what about using a database to store filename, paths, dates, users, etc,  that way you have more info and its more accessible.  Plus you can use ado to fill the datalists.  if you uploaded the files to a folder, you wouldnt have to do anything special to get it v-scanned bc on-access scan should hit it.
0
 
wct296Commented:
In standard ASP, we used a program/add-on called ASPupload


www.aspupload.com 

works well
0
 
bolenkaAuthor Commented:
So save the PATH information to the database and then use ADO to access the datapath information???  So if the user clicks on the actual datapath, they will be able to access their uploaded files? I need to associate the files with a particular user... can I do that using USER information stored the session and then they will be able to see their files in the list? That is the only thing I am unclear on...is if I save the path of the files in the folder to the database, how will the user be able to get to their files. What kind of code would I need to write for that. I would be writing the code behind using VB.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now