how to add download link for excel file in master page

Posted by Parthibansk under ASP.NET on 3/11/2013 | Points: 10 | Views : 1442 | Status : [Member] | Replies : 3
got user registration details stored in excel sheet..want tat excel sheet to be downloadable in all pages by placing link..

how to implement same in master page..




Responses

Posted by: Sakthi.Singaravel on: 3/11/2013 [Member] Silver | Points: 25

Up
0
Down
use anchor tag for excel file location.

Regards,
Singaravel M

Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikreddy on: 3/11/2013 [Member] Starter | Points: 25

Up
0
Down
Response.ContentType = "Excel/xlsx";
Response.AppendHeader("Content-Disposition","attachment; filename=karthik.xlsx");
Response.TransmitFile( Server.MapPath("~/images/karthk.xlsx") );
Response.End();

k@rth!k
karthikreddy08a50@gmail.com

Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santhi on: 3/11/2013 [Member] Starter | Points: 25

Up
0
Down
Hi

Refer this link:
This may help you:http://www.codeproject.com/Tips/477436/Export-Gridview-Data-to-Excel-in-ASP-NET

Thanks & Regards,
Santhi .V

Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response