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

Posted on 2007-07-28
Last Modified: 2013-11-27
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?
Question by:bolenka
    LVL 6

    Accepted Solution

    yes it is very possible.. i would start here:

    and also here:

    i used those articles for a similar project.
    LVL 3

    Assisted Solution

    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

    How to Upload Files with the FileUpload Web Server Control


    Author Comment

    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 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?
    LVL 6

    Expert Comment

    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.
    LVL 7

    Assisted Solution

    In standard ASP, we used a program/add-on called ASPupload

    works well

    Author Comment

    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 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.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
    Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
    Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
    Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now