Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. Just to clarify a bit, the Save doc.Save(Response, "out.doc", ContentDisposition.Inline, null); method works like the following code.
Aspose.Words.Document doc = new Aspose.Words.Document();
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
builder.Write("Hello world!!!");
MemoryStream stream = new MemoryStream();
doc.Save(stream, SaveFormat.Doc);
Response.Clear();
//Specify the document type.
Response.ContentType = "application/word";
//Other options:
//Response.ContentType = "text/plain"
//Response.ContentType = "text/html"
//Specify how the document is sent to the browser.
//Response.AddHeader("content-disposition","attachment; filename=MyDocument.doc");
//Another option could be:
Response.AddHeader("content-disposition", "inline; filename=out.doc");
//Get data bytes from the stream and send it to the response.
byte[] bytes = stream.GetBuffer();
Response.BinaryWrite(bytes);
Response.End();
When you send file to client’s browser open/save/cancel dialog is always displayed.
Best regards.