var files = Request.Files; List<string> Settlement_Offer_Details = files.AllKeys.Where(n => n.StartsWith("fileSO")).ToList(); Settlement_Offer_Details.Add(fileSO.Name); foreach (var item in Settlement_Offer_Details) { ContentPlaceHolder content = Page.Master.FindControl("MainContent") as ContentPlaceHolder; FileUpload fu = content.FindControl(item) as FileUpload; //FileUpload tb = FindControl(item) as FileUpload; }
for (int i = 0; i < Request.Files.Count; i++) { HttpPostedFile PostedFile = Request.Files[i]; if (PostedFile.ContentLength > 0) { string FileName = System.IO.Path.GetFileName(PostedFile.FileName); PostedFile.SaveAs(Server.MapPath("Files\\") + FileName); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)