New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Persisting PanelBar Settings

  • Mail
    • Personal Folders
    • Deleted Items
    • Inbox
    • My Mail
    • Sent Items
    • Outbox
    • Search Folders
  • Contacts
    • My Contacts
    • Address Cards
    • Phone List
    • Shared Contacts
  • Tasks
    • My Tasks
    • Shared Tasks
    • Active Tasks
    • Completed Tasks
  • Notes
    • My Notes
    • Notes List
    • Shared Notes
    • Archive
  • Folders List
    • My Client.Net
    • My Profile
    • My Support Tickets
    • My Licenses

In this example you can see how to preserve the Selected Tab and Selected Item of the PanelBar control using the Telerik ASP.NET Persistence Framework.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page Title="" Language="C#"  AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="DefaultCS" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>

<!DOCTYPE html>
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />

    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadPersistenceManager runat="server" ID="RadPersistenceManager1">
            <telerik:PersistenceSetting ControlID="RadPanelBar1" />
    <div class="demo-container size-narrow">
        <div class="demo-settings">
            <telerik:RadButton RenderMode="Lightweight" ID="SaveButton" runat="server" Text="Save state" OnClick="SaveButton_Click" />
            <telerik:RadButton RenderMode="Lightweight" ID="ResetButton" runat="server" Text="Reset state" OnClick="ResetButton_Click" />
            <telerik:RadButton RenderMode="Lightweight" ID="LoadButton" runat="server" Text="Load state" OnClick="LoadButton_Click" />
        <telerik:RadPanelBar RenderMode="Lightweight" runat="server" ID="RadPanelBar1" Width="100%">
                <telerik:RadPanelItem Text="Mail" Expanded="True">
                        <telerik:RadPanelItem Text="Personal Folders" />
                        <telerik:RadPanelItem Text="Deleted Items" />
                        <telerik:RadPanelItem Text="Inbox" />
                        <telerik:RadPanelItem Text="My Mail" />
                        <telerik:RadPanelItem Text="Sent Items" />
                        <telerik:RadPanelItem Text="Outbox" />
                        <telerik:RadPanelItem Text="Search Folders" />
                <telerik:RadPanelItem Text="Contacts">
                        <telerik:RadPanelItem Text="My Contacts" />
                        <telerik:RadPanelItem Text="Address Cards" />
                        <telerik:RadPanelItem Text="Phone List" />
                        <telerik:RadPanelItem Text="Shared Contacts" />
                <telerik:RadPanelItem Text="Tasks">
                        <telerik:RadPanelItem Text="My Tasks" />
                        <telerik:RadPanelItem Text="Shared Tasks" />
                        <telerik:RadPanelItem Text="Active Tasks" />
                        <telerik:RadPanelItem Text="Completed Tasks" />
                <telerik:RadPanelItem Text="Notes">
                        <telerik:RadPanelItem Text="My Notes" />
                        <telerik:RadPanelItem Text="Notes List" />
                        <telerik:RadPanelItem Text="Shared Notes" />
                        <telerik:RadPanelItem Text="Archive" />
                <telerik:RadPanelItem Text="Folders List">
                        <telerik:RadPanelItem Text="My Client.Net" />
                        <telerik:RadPanelItem Text="My Profile" />
                        <telerik:RadPanelItem Text="My Support Tickets" />
                        <telerik:RadPanelItem Text="My Licenses" />
            <ExpandAnimation Type="None" />
            <CollapseAnimation Type="None" />

Support & Learning Resources

Find Assistance