Simple.Net upload and download

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Upload:

First, we need a -FileUpLoad control to upload,

Add the last upload button,

Add the following code in the upload button's Click event:

1 FileUpload1.SaveAs(Server.MapPath("~/") + FileUpload1.PostedFile.FileName);

In theory, so that you can complete the upload,

Need to pay attention to is so uploaded files are in the root directory of the project,

And if you repeat upload will cover the uploaded files,

The detailed content is not in writing,

Download:

Here we use <a> label in the form of the download,

href://The link is the server path to store the a.txt file,

1 1 <a href='http://192.168.132.97: 10082/item/a.txt'>a.txt</a>

Through a left click, or right click Save as to download,

Of course, this is only the most simple,

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Tiffany at November 15, 2013 - 10:30 AM