Hi,
If u want to Multiple file upload control, see the following information. I hope it will help for u.
In ASP.NET We can upload more than one file using the classes
HttpFileCollection
HttpPostedFile
Request.Files
System.IO.Path
HttpFileCollection:
HttpFileCollection will provide access to the files uploaded by a client.
HttpPostedFile:
HttpPostedFile will provide access to individual files uploaded by a client. Through this class we can access the content and properties of each individual file, and read and save the files.
Request.Files :
The Request.Files will return collection of all files uploaded by user and store them inside the HttpFileCollection.
Sample Code:
HttpFileCollection uploadFile = Request.Files;
for(int i=0;i
{
HttpPostedFile file = uploadFile[i];
string fName = Path.GetfName(file.FileName);
if(fName != string.Empty)
{
try
{
file.SaveAs(Server.MapPath("./foldername/") + fName);
this.ShowMessage("Successfully Saved");
}
catch(Exception ex)
{
this.ShowMessage(ex.Message);
}
}
}
Regards,
Rajesh Gupta.