I have a grid view. The data bound to the grid view. I have a column with download link button. When I click on download the file should be downloaded but I got some issue while tying it.
I uploaded files to application folder and the path to database but when I try to download the file it fires an error
LinkButton lnkbtn = sender as LinkButton;
GridViewRow gvrow = lnkbtn.NamingContainer as GridViewRow;
string filePath = gridView1.DataKeys[gvrow.RowIndex].Value.ToString();
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + filePath + "\"");
Response.TransmitFile(Server.MapPath(filePath));
Response.End();
But my application folder has the uploaded file


Response.TransmitFile(Server.MapPath("/documents/mini/"+filePath));(instead of your line).