title: Can't download a file from application folder in asp.net
body: <p>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. </p>
  
  <p>I uploaded files to application folder and the path to database but when I try to download the file it fires an error</p>
  
  <pre><code>    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();
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/zA5Mb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zA5Mb.png" alt=""></a></p>
  
  <p>But my application folder has the uploaded file</p>
  
  <p><a href="https://i.stack.imgur.com/Et2Hp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Et2Hp.png" alt="enter image description here"></a></p>