XpoDataSource.Session Property
Gets or sets the Session used by the current data source control to load and save persistent objects.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v20.1.dll
NuGet Packages: DevExpress.WindowsDesktop.Xpo, DevExpress.Xpo
Declaration
Property Value
Type | Description |
---|---|
Session | A Session object connected to a data store. |
Remarks
A session which the data source control will work with can be assigned within a page’s Init event handler.
using System;
using DevExpress.Xpo;
// ...
Session session1;
protected void Page_Init(object sender, EventArgs e) {
session1 = new Session();
XpoDataSource1.Session = session1;
}
For more information on how to retrieve specific data, see Connecting XPO to a Database Server (ASP.NET).
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Session 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.