Click or drag to resize
ContentDisposition Enumeration
Enumerates different ways of presenting the document at the client browser.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.11
Syntax
public enum ContentDisposition
Members
  Member nameValueDescription
Attachment0 Send the document to the browser and present an option to save the document to disk or open in the application associated with the document's extension.
Inline1 Send the document to the browser and presents an option to save the document to disk or open inside the browser.
Remarks

Note that the actual behavior on the client browser might be affected by security configuration of the browser.

Examples
Performs a simple insertion of data into merge fields and sends the document to the browser inline.
// Open an existing document.
Document doc = new Document(MyDir + "MailMerge.ExecuteArray.doc");

// Fill the fields in the document with user data.
doc.MailMerge.Execute(new String[] { "FullName", "Company", "Address", "Address2", "City" },
    new object[] { "James Bond", "MI5 Headquarters", "Milbank", "", "London" });

// Send the document in Word format to the client browser with an option to save to disk or open inside the current browser.
Assert.That(() => doc.Save(Response, "Artifacts/MailMerge.ExecuteArray.doc", ContentDisposition.Inline, null), Throws.TypeOf<ArgumentNullException>()); //Thrown because HttpResponse is null in the test.
See Also