HttpFileCollection hfc = Request.Files;
string f_Name, f_Size, f_Type;
for (int i = 0; i <= hfc.Count - 1; i++) {
HttpPostedFile hpf = hfc[i];
f_Name = Path.GetFileName(hpf.FileName);
f_Size = hpf.ContentLength.ToString();
f_Type = hpf.ContentType.ToString();
hpf.SaveAs(Server.MapPath("~/UpFile/" + f_Name.ToString()));
Response.Write("上传成功!<br>" + f_Name + "<br>" + f_Type + "<br><br>");
}