Skip to content

Instantly share code, notes, and snippets.

View sohaiby's full-sized avatar
🎯
Focusing

Sohaib Ahmed sohaiby

🎯
Focusing
View GitHub Profile
@sohaiby
sohaiby / html_multifile_upload
Created January 28, 2017 05:18
HTML Multiple file upload
private object uploadFile(string filename)
{
//I've multiple fileupload controls in my form, that's why I am passing the name property of my fileupload control here
if (Request.Files.Count > 0)
{
HttpFileCollection files = Request.Files;
string[] keys = files.AllKeys; //Extracting the name of all files (which actually is the name of html file control) in order to identify the correct file w.r.t control
for (int i = 0; i < files.Count; i++)
{