Back to Devexpress

ASPxSpreadsheet.DocumentId Property

aspnet-devexpress-dot-web-dot-aspxspreadsheet-dot-aspxspreadsheet-0beb070c.md

latest2.5 KB
Original Source

ASPxSpreadsheet.DocumentId Property

Specifies the unique identifier of the active document.

Namespace : DevExpress.Web.ASPxSpreadsheet

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

NuGet Package : DevExpress.Web.Office

Declaration

csharp
public string DocumentId { get; set; }
vb
Public Property DocumentId As String

Property Value

TypeDescription
String

The document identifier.

|

Remarks

A document in the web server’s memory is identified by a unique string – document ID. All operations that you perform in ASPxSpreadsheet affect the active (last opened) document whose document ID value is contained in the DocumentId property.

A new document has an empty document ID value, thus the document is not accessible from the DocumentManager API. The ASPxSpreadsheet retains such a document until the control switches to another document. The ASPxSpreadsheet generates a document ID value for the document when a user saves it to a file system. Alternatively, you can assign a GUID to the DocumentId property explicitly:

csharp
ASPxSpreadsheet1.New();
ASPxSpreadsheet1.DocumentId = Guid.NewGuid().ToString();
vb
ASPxSpreadsheet1.New()
ASPxSpreadsheet1.DocumentId = Guid.NewGuid.ToString()

If you open a document from a database, you can use data record key values as document identifiers. The ASPxSpreadsheet control does not send document ID values to the client and uses random GUIDs instead.

See Also

Spreadsheet Document Management

ASPxSpreadsheet Class

ASPxSpreadsheet Members

DevExpress.Web.ASPxSpreadsheet Namespace