ASPX Page Design –
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());
}
}
}
}
}
}
}
Please guide - This is a bit urgent and important...
Khaja MoizuddinPosted Dec 4, 2016, 12:00 AM