Upload a File into application server Folder in ASP.Net

Posted by Kamalakanta.Nayak09 under ASP.NET on 3/21/2012 | Points: 10 | Views : 4705 | Status : [Member] | Replies : 2
What is the easy way to upload a 4MB File into my application server folder in ASP .Net ?

Thanks,
K.K



Responses

Posted by: Rajni.Shekhar on: 3/21/2012 [Member] Bronze | Points: 25

Up
0
Down
using FileUploader control.

Example
string filePath = Server.MapPath(@"~/AppFiles/"+EmpNo+"_Files/");
if (Directory.Exists(filePath))
{
if (FileUploader.PostedFile.ContentLength != 0)
{
FileUploader.SaveAs(filePath + FileUploader.FileName);
}
}

Thanks,
Rajni Shekhar

Kamalakanta.Nayak09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gopinath on: 3/21/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
please Refer this linkhttp://www.c-sharpcorner.com/UploadFile/e83792/upload-files-in-folder-and-download-files-from-folder-in-asp/
It will be very useful to u.

C.Gopinath

Kamalakanta.Nayak09, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response