aspnet-devexpress-dot-web-dot-aspxrichedit-dot-aspxrichedit-06b80425.md
Specifies the unique identifier of the active document.
Namespace : DevExpress.Web.ASPxRichEdit
Assembly : DevExpress.Web.ASPxRichEdit.v25.2.dll
NuGet Package : DevExpress.Web.Office
public string DocumentId { get; set; }
Public Property DocumentId As String
| Type | Description |
|---|---|
| String |
The document identifier.
|
A document in the web server’s memory is identified by a unique string – document ID. All operations that you perform in ASPxRichEdit affect the active (last opened) document whose document ID value is contained in the DocumentId property.
View Example: How to save/load documents to/from a database
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DocumentId property.
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.
asp-net-web-forms-richedit-work-with-database/CS/ASPxRichEdit_Binding/Default.aspx.cs#L60
protected void SqlDataSource1_Updating(object sender, SqlDataSourceCommandEventArgs e) {
e.Cancel = RichEdit.DocumentId == string.Empty; //Save only opened documents
e.Command.Parameters["@Id"].Value = RichEdit.DocumentId;
asp-net-web-forms-richedit-work-with-database/VB/ASPxRichEdit_Binding/Default.aspx.vb#L62
Protected Sub SqlDataSource1_Updating(ByVal sender As Object, ByVal e As SqlDataSourceCommandEventArgs)
e.Cancel = Equals(RichEdit.DocumentId, String.Empty) 'Save only opened documents
e.Command.Parameters("@Id").Value = RichEdit.DocumentId
See Also