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);
-
am getting the content now i want to display that in ajax success(data)