ASPxRichEdit.Open(String) Method
Opens a document from a file system.
Namespace: DevExpress.Web.ASPxRichEdit
Assembly: DevExpress.Web.ASPxRichEdit.v25.2.dll
NuGet Package: DevExpress.Web.Office
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| pathToDocument | String | The path to a document to open. |
Remarks
Call this Open method to open a document from the server’s file system. When you open a document for the first time, the control loads it to the server’s memory and generates a DocumentId from the pathToDocument parameter value.
If the document is already open, the method activates the document stored in the server’s memory.
string pathToDocument = Server.MapPath("~/App_Data/Documents/doc.rtf");
ASPxRichEdit1.Open(pathToDocument);
Specify the WorkDirectory property to enable the Open and Save As UI commands. Users cannot access the file system outside the specified directory.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Open(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.