0

What I tried so far

Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/vnd.ms-visio";
Response.WriteFile(file.FullName);
Response.End();

Here file is of FileInfo type, I am not sure how to write this .vsdx file to response Stream.

Our Man in Bananas
  • 5,809
  • 21
  • 91
  • 148
manas das
  • 64
  • 12
  • Are you aware that a `.vsdx` file is essentially a `.zip` file with a different extension? https://msdn.microsoft.com/en-us/library/office/jj228622.aspx – David Tansey May 22 '15 at 22:37
  • Yes I know, I was thinking as we do for .vdx file we simply write .xml contents and specify Its Content type as Visio(as mention above), it prompts user to Open. and on Click it shows the Exact .vdx file which was written to response Stream. – manas das Sep 07 '15 at 17:08

0 Answers0