i want to display my excel file which already in my application local folder how to do
am get byte code in view
- string filepath = Server.MapPath("~/Files/")+sfilename ;
- byte[] filedata = System.IO.File.ReadAllBytes(filepath);
- string contentType = MimeMapping.GetMimeMapping(filepath);
- var cd = new System.Net.Mime.ContentDisposition
- {
- FileName = sfilename,
- Inline = true,
- };
- Response.AppendHeader("Content-Disposition", cd.ToString());
- return File(filedata, contentType);
Leon DPosted Jan 22, 2019, 7:29 PM
Salman BegPosted Jan 22, 2019, 5:08 AM
ejaz mirzaPosted Jan 22, 2019, 4:55 AM
Salman BegPosted Jan 22, 2019, 4:23 AM
ejaz mirzaPosted Jan 22, 2019, 4:14 AM
Salman BegPosted Jan 22, 2019, 4:00 AM
ejaz mirzaPosted Jan 22, 2019, 3:37 AM
Sreekanth ReddyPosted Jan 22, 2019, 2:52 AM