In ASP.NET you can you this piece of code. This will solve your issue and you can upload multiple files
C#
protected void btnUpload_Click(object sender, EventArgs e)
{
try
{
HttpFileCollection hfc = Request.Files;
for (int i = 0; i < hfc.Count; i++)
{
HttpPostedFile hpf = hfc[i];
if (hpf.ContentLength > 0)
{
hpf.SaveAs(Server.MapPath("MyFiles") + "\\" +
Path.GetFileName(hpf.FileName));
}
}
}
catch (Exception ex)
{
}
}