I am saving .docx file to database, the content type for .docx is :-application/vnd.openxmlformats-officedocument.wordprocessingml.document
but whil opening .docx file its giving error as
The file"abc.docx" cannot be opened because there are problem with content.
Details: The file is corrupt and can not be open.
but when chicking ok its opening the correct content.
My code is:
Response.AppendHeader("Content-Disposition", "attachment;filename=" + filename);
Response.ContentType = contenttype;
Response.OutputStream.Write(filedata, 0, filedata.Length);
View Complete Post