Skip to main content

ASPxNavBar.SaveStateToCookies Property

Gets or sets a value that specifies whether cookies are used to persist the expansion state of the NavBar’s groups.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web


public bool SaveStateToCookies { get; set; }

Property Value

Type Default Description
Boolean false

true if the expansion state of groups is persisted in cookies; otherwise, false.


Use the SaveStateToCookies property to control whether a cookie is used to maintain information about the expansion state of the navbar’s groups. If the browser or device supports cookies, then cookies are used to persist the groups’ expansion state; otherwise, information about this state is lost between different requests for the same page from the client device’s browser.

When this property is set to true, the ASPxNavBar.SaveStateToCookiesID property can be also used to specify how the navbar’s state information should be persisted in cookies.

Note that saving to cookies takes place on the server side. Therefore, to save state to cookies you need to process the client-side ASPxClientNavBar.ExpandedChanging event on the server side as shown bellow:

See Also