ASPX Page Design –
<head>
<title><title>
<link href=”App_Themes/Scripts/uploadify.css” rel=”stylesheet”/>
</head>
<body>
<script type=”text/javascript” src=” App_Themes/Scripts/jquery-.3.2.js”></script>
<script type=”text/javascript” src=” App_Themes/Scripts/jquery.Multifile.js”></script>
<form id=”form1” runat=”server”>
<table>
<tr>
<td>
<asp:radiobuttonlist id=”radiobtnlistSerialNumber” runat=”server”></asp:radiobuttonlist>
</td>
<asp:Fileupload id=”multiplefileupload” runat=”server” class=”multi”/>
</tr>
<td colspan=”2”>
<asp:GridView id=”grdData” runat=”server” AutogenerateColumns=”true”>
</asp:GridView>
<asp:button id=”UploadFilesBtn” runat=”server” Text=”Upload Multiple Files” onClick=” UploadFilesBtn _Click”/>
</table>
</form>
</body>
ASPX.cs file –
Protected void UploadFilesBtn _Click(object sender, EventArgs, e)
{
Try
HttpFileCollection hfc = Request.Files;
If(radiobtnlistSerialNumber.SelectedIndex >= 0)
If(multiplefileupload.HasFile == true)
Foreach(Gridviewrow row in grdData.Rows)
If(row.cells[2].text == radiobtnlistSerialNumber.Selectedvalue.tostring())
HttpFileCollection hcoll = Request.Files;
Int32 totalcount = hcoll.Count;
For(int i=0; I < totalcount-1; i++)
HttpPostedFile hpf =hcoll[i];
String s = ConfigurationManager.AppSettings[“UploadFolderPath”].ToString();
Multiplefileupload.PostedFile.SaveAs(s +”\\”+System.DateTime.Now.Tostring(“ddMMMyyyyhhmmss”) + multiplefileupload.FileName);
//Insert into table – values (radiobtnlistSerialNumber.Selectedvalue.tostring(),
//System.DateTime.Now.Tostring(“ddMMMyyyyhhmmss”) + multiplefileupload.FileName,
//Row.Cells[4].text.tostring());
}