-
Notifications
You must be signed in to change notification settings - Fork 0
/
Default.aspx.vb
26 lines (22 loc) · 1.07 KB
/
Default.aspx.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Imports DevExpress.DashboardCommon
Imports DevExpress.DashboardWeb
Imports System
Imports System.Web
Namespace WebDashboard_DashboardStateCookies
Public Partial Class [Default]
Inherits UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Protected Sub ASPxDashboard1_SetInitialDashboardState(ByVal sender As Object, ByVal e As SetInitialDashboardStateEventArgs)
' Requests the "dashboardState" cookie:
Dim cookie As HttpCookie = Request.Cookies("dashboardState")
If cookie IsNot Nothing Then
Dim dashboardState As DashboardState = New DashboardState()
' Initializes a DevExpress.DashboardCommon.DashboardState object from the JSON state:
dashboardState.LoadFromJson(HttpUtility.UrlDecode(cookie.Value))
' Applies the initial dashboard state if it exists in cookies:
If Equals(e.DashboardId, "dashboard1") Then e.InitialState = dashboardState
End If
End Sub
End Class
End Namespace