Back to Devexpress

ASPxRichEdit.Save() Method

aspnet-devexpress-dot-web-dot-aspxrichedit-dot-aspxrichedit-a237092d.md

latest3.6 KB
Original Source

ASPxRichEdit.Save() Method

Saves the active document in its original format at its original location.

Namespace : DevExpress.Web.ASPxRichEdit

Assembly : DevExpress.Web.ASPxRichEdit.v25.2.dll

NuGet Package : DevExpress.Web.Office

Declaration

csharp
public void Save()
vb
Public Sub Save

Remarks

Call the Save method to initiate a save operation for the active document. The method invokes the Saving event, which allows you to implement custom saving logic. If you do not handle the event (the e.Handled property is not set to true), the control processes the document in the following ways:

  • If a document is opened from the server’s local file system, the control overwrites the original document file.
  • If a document is new ( DocumentId is not specified), or a document was opened from a custom document storage, the control throws an exception. Handle the Saving event to implement custom saving logic.
  • If the save operation causes a conflict, the control throws an exception. Handle the Saving event to resolve conflicts.

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 Save() 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.

asp-net-web-forms-richedit-work-with-database/CS/ASPxRichEdit_Binding/Default.aspx.cs#L17

csharp
protected void SaveButton_Click(object sender, EventArgs e) {
    RichEdit.Save();
}

asp-net-web-forms-richedit-work-with-database/VB/ASPxRichEdit_Binding/Default.aspx.vb#L27

vb
Protected Sub SaveButton_Click(ByVal sender As Object, ByVal e As EventArgs)
    RichEdit.Save()
End Sub

See Also

Save a Document

SaveCopy

ASPxRichEdit Class

ASPxRichEdit Members

DevExpress.Web.ASPxRichEdit Namespace