Skip to main content

ASPxRichEdit.AutoSaveMode Property

Specifies whether the autosave mode is enabled.

Namespace: DevExpress.Web.ASPxRichEdit

Assembly: DevExpress.Web.ASPxRichEdit.v22.1.dll

Declaration

[DefaultValue(AutoSaveMode.Default)]
public AutoSaveMode AutoSaveMode { get; set; }

Property Value

Type Default Description
AutoSaveMode

Default

One of the AutoSaveMode values.

Available values:

Name Description
Default

The autosave feature is disabled by default. If a document is opened by multiple controls with different values of the AutoSaveMode property, the autosave feature is enabled for every control. The timeout is set to the smallest value among all these controls.

On

The autosave mode is enabled. The control saves the active document automatically on each timeout.

Remarks

Set the AutoSaveMode property to On to make the ASPxRichEdit control save the active document automatically on each timeout specified by the AutoSaveTimeout property. Note, to improve control performance, the DocumentManager processes multiple documents in parts with a 20-second interval. This behavior can cause a difference between the specified and the actual autosave timeout. For instance, when the specified timeout is short and the document manager processes a lot of documents, the actual timeout duration can increase.

If a document is opened by multiple ASPxRichEdit controls with the autosave feature enabled, the timeout is set to the smallest value among all these controls.

<dx:ASPxRichEdit ID="ASPxRichEdit1" runat="server" WorkDirectory="~/App_Data/WorkDirectory" 
    AutoSaveMode="On" AutoSaveTimeout="00:10:00" >
</dx:ASPxRichEdit>

The autosave feature invokes the AutoSaving event that allows you to implement custom autosave logic. If you do not handle the event (the e.Handled property is set to false), 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, or a document was opened from a custom document storage, the control throws an exception. Handle the AutoSaving event to implement custom saving logic.
See Also