Wednesday, 29 February 2012

Downloading excel file from route directory in asp.net

Use the following code to import the file from route directory:


Response.ContentType = "application/ms-excel";
Response.AddHeader("content-disposition", "inline; filename=sample.xls");
Response.TransmitFile("sample.xls");
Response.Flush();

Tag: addheader, Asp.net, download, excel, export, file, import, route, transmitfile, xls

No comments:

Post a Comment

Parsing JSON w/ @ symbol in it

To read the json response like bellow @ concatenated with attribute                             '{ "@id": 1001, "@name&q...