Quantcast
Channel: How to download a file using ASP.NET - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by Delta for How to download a file using ASP.NET

Use the below code to download the file on link button click<asp:LinkButton ID="btnDownload" runat="server" Text="Download" OnClick="btnDownload_OnClick" />protected void...

View Article



Answer by Mohamed Farrag for How to download a file using ASP.NET

In your code just change this line :Response.TransmitFile(Server.MapPath(file));toResponse.TransmitFile(file);This because of you are sending the physical path not the virtual path as Server.MapPath...

View Article

Answer by Vinod for How to download a file using ASP.NET

Check Any of these . StreamReader Server.MapPath - Physical path given, virtual path expectedhttp://www.codeproject.com/Questions/624307/Server-MapPath-Physical-path-given-virtual-path-ex

View Article

How to download a file using ASP.NET

In the below code i want to download a file from local when i click link button it should download a file from specific path. In my case it throws 'C:/Search/SVGS/Documents/img.txt' is a physical path,...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images