Skip to main content
A newer version of this page is available. .

SpreadsheetExtension.Open(String, String) Method

Opens the specified document.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v18.2.dll

Declaration

public static ActionResult Open(
    string extensionName,
    string filePath
)

Parameters

Name Type Description
extensionName String

A string value that specifies the Spreadsheet name.

filePath String

A string value specifying the path to the document to open.

Returns

Type Description
ActionResult

A ActionResult object that represents the result of the operation.

Remarks

Use the Open method to open a document located at a specific path on the server.

Note that the Open method uses the control’s parameters stored as an additional parameter of the control’s work session to restore all the controls settings and return a relevant partial view in a controller action. It is recommended to avoid using the DocumentManager.CloseAllDocuments method that clears all the session parameters, including control settings and close only specific documents using the documents names.

Alternatively, you can open documents by passing a document name from a controller to a partial view using the View Data collection and invoking the Open method directly in the partial view.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Open(String, String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also