dashboard-17407-web-dashboard-integrate-dashboard-component-aspnet-web-forms-dashboard-control-load-a-dashboard.md
You can load a single dashboard to your Web Dashboard application.
ASPxDashboard.DashboardXmlPathGets or sets the path to the XML definition of a dashboard to be loaded to ASPxDashboard.ASPxDashboard.OpenDashboardLoads a dashboard from a string containing a dashboard XML definition.ASPxDashboard.DashboardTypeGets or sets a dashboard created at design time within Visual Studio. This property is in effect only when ASPxDashboard acts as Viewer.
However, users cannot save changes in a dashboard and create new dashboards if you use this approach. To allow users to do this, create dashboard storage.
Dashboard storage is a location of dashboards you use in your Web Dashboard application. Users can save new dashboards to this storage and open existing dashboards. You can use the following API to manage dashboards in dashboard storage:
ASPxDashboard.DashboardStorageFolderGets or sets the path to a folder used to keep dashboards.ASPxDashboard.LoadDefaultDashboardGets or sets whether the default dashboard should be loaded from the dashboard storage.ASPxDashboard.InitialDashboardIdGets or sets the identifier of the dashboard to be loaded to ASPxDashboard.
The DashboardInMemoryStorage and DashboardFileStorage classes implement the IDashboardStorage interface. Cast a corresponding object to IDashboardStorage and use IDashboardStorage.GetAvailableDashboardsInfo to obtain available dashboard identifiers.
You can also use the following events to modify dashboards in dashboard storage:
DashboardControl.loadDashboardUse this method to load a dashboard with the specified identifier from the dashboard storage.DashboardControl.unloadDashboardCall this method to close the displayed dashboard.DashboardControlOptions.initialDashboardIdUse this property to specify the identifier of the dashboard to be loaded to the DashboardControl before the control is rendered.
The following code snippet demonstrates how to load a dashboard with the dashboard1 identifier on the client:
dashboardControl.loadDashboard("dashboard1")
.done(function () { alert("A dashboard is loaded successfully."); })
.fail(function() { alert("Cannot load a dashboard."); });