dashboard-devexpress-dot-dashboardweb-66e94f65.md
Contains options that allow you to configure the Web Dashboard’s back-end.
Namespace : DevExpress.DashboardWeb
Assembly : DevExpress.Dashboard.v25.2.Web.WebForms.dll
NuGet Package : DevExpress.Web.Dashboard
public class DashboardBackendOptions
Public Class DashboardBackendOptions
The following members return DashboardBackendOptions objects:
Separated client and server parts require you to configure an ASP.NET Core or ASP.NET MVC Dashboard control as a server and create the client Web Dashboard application.
You can use a Web Dashboard in the following ways:
The table below shows the available compatibility options between the server and the supported client platforms. The column headers indicate what you can use on the server and the row headers show available clients.
|
Client \ Server
|
ASP.NET Core Controller
|
ASP.NET MVC Controller
|
ASP.NET HTTP Handlers
|
ASP.NET Web Forms Callback
| | --- | --- | --- | --- | --- | |
Dashboard Component for Blazor
|
|
|
|
| |
Dashboard Component for Angular
|
|
|
|
| |
Dashboard Component for React
|
|
|
|
| |
Dashboard Component for Vue
|
|
|
|
| |
Dashboard Control for JavaScript Applications (JQuery, Knockout, etc.)
|
|
|
|
| |
ASP.NET Core Razor Extension
|
|
|
|
| |
ASP.NET MVC Razor Extension
|
|
|
|
| |
ASP.NET Web Forms (ASPxDashboard‘s API)[1]
|
|
|
|
| |
ASP.NET Web Forms (DashboardConfigurator‘s API)[2]
|
|
|
|
|
Use the following properties/methods for a corresponding platform to configure server settings for the client application:
|
Platform
|
Member
| | --- | --- | |
ASP.NET Web Forms
|
| |
ASP.NET MVC
|
DashboardExtensionSettings.BackendOptions
| |
ASP.NET Core
|
DashboardBuilder.BackendOptions
| |
HTML JS
|
DashboardControlOptions.endpoint / FetchRemoteServiceOptions.headers
|
The following code snippets show how to configure the client: set the server’s URL and pass a custom Authorization header. Note that the server’s URL should consist of a base URL (where the Web Dashboard’s server side is hosted) and a route prefix (a value that is set in the MVC / .NET Core MapDashboardRoute properties).
For MVC or ASP.NET Core back-end, the url is a controller’s address:
DashboardControl.BackendOptions.Uri = "{baseURL}/api/dashboard";
DashboardControl.BackendOptions.RequestHttpHeaders.Add("Authorization", "AuthToken123");
@(Html.DevExpress().Dashboard("dashboardControl1")
.BackendOptions(options => options.Uri("{baseURL}/api/dashboard").RequestHttpHeaders(headers => { headers.Add("Authorization", "AuthToken123"); }))
)
<script>
window.onload = function () {
var dashboardControl = new DevExpress.Dashboard.DashboardControl(document.getElementById("web-dashboard"), {
endpoint: "{baseURL}/api/dashboard",
fetchRemoteService: {
headers: {
'Authorization': 'AuthToken123'
}
}
});
}
</script>
For a WebForms control that uses the DashboardConfigurator‘s instance API, provide the Dashboard HTTP handler’s url instead of the controller’s address:
DashboardControl.BackendOptions.Uri = "{baseURL}/api/dashboard/DXDD.axd";
You need to set up cross-origin resource sharing (CORS) on your back-end to configure corresponding permissions to access selected resources from a server at a different origin.
Object DashboardBackendOptions
Footnotes
The default ASPxDashboard mode. The control uses the ASPxDashboard‘s API for server-side configuration and sends requests only to its instance.
The control uses the DashboardConfigurator‘s API. The DashboardConfigurator uses HTTP Handlers to send requests to the server.
See Also
DashboardBackendOptions Members