The requested page is not available for the requested platform. You are viewing the content for Default platform.

Server-Side API Overview

The Web Dashboard comprises client and server parts:

  • The client part supplies end-users with a user interface for designing a dashboard and interacting with it.
  • The server part handles client data requests and provides various backend capabilities such as accessing data, storing dashboards, etc.

The Web Dashboard requires configuring various server-side options before first use. These include preparing a dashboard storage, registering predefined data sources, etc. Each platform (Web Forms, MVC, .NET Core) has a different approach to utilizing a server-side API.

If you use the ASP.NET MVC Dashboard extension, select one of the following approaches.

  • By default, the ASP.NET MVC Dashboard uses an API exposed by the DashboardConfigurator class. In this case, the DashboardConfigurator.Default object provides access to shared server-side settings.
  • If necessary, you can create and initialize separate DashboardConfigurator instances within an application to provide different server-side settings. For instance, you can enable this capability in the MVC application to use separate settings for different views. To learn more, see the example below.

Example

This example shows how to use separate DashboardConfigurator instances within an ASP.NET MVC Dashboard application to provide different server-side settings. In this example, the Sales and Marketing views use different dashboard storage and different data connections.

using System.Web.Mvc;

namespace MVCDashboard_ServerSideAPI.Controllers {
    public class HomeController : Controller {
        public ActionResult Index() {
            return View();
        }

        public ActionResult SalesDashboards() {
            return View("SalesView");
        }
        public ActionResult MarketingDashboards() {
            return View("MarketingView");
        }
    }
}