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

Programmatic State Persistence

Current page

This is the tabstrip page

RadPanelBar is often used as a navigation element. This example shows how to persist the state of the panelbar by using the RadPanelBar's FindItemByUrl method.

Please review the code for more details.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Language="vb" CodeFile="DefaultVB.aspx.vb" AutoEventWireup="true" Inherits="PanelBar.Examples.ApplicationScenarios.PersistingState.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-medium">
        <telerik:RadPanelBar RenderMode="Lightweight" runat="server" ID="RadPanelBar1" Width="350px" Height="300" ExpandMode="FullExpandedItem">
            <Items>
                <telerik:RadPanelItem Text="ASP.NET controls" Expanded="True">
                    <Items>
                        <telerik:RadPanelItem NavigateUrl="DefaultVB.aspx?page=menu" Text="RadMenu" />
                        <telerik:RadPanelItem NavigateUrl="DefaultVB.aspx?page=combobox" Text="RadComboBox" />
                        <telerik:RadPanelItem NavigateUrl="DefaultVB.aspx?page=panelbar" Text="RadPanelBar" />
                        <telerik:RadPanelItem NavigateUrl="DefaultVB.aspx?page=treeview" Text="RadTreeView" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="WinForms controls">
                    <Items>
                        <telerik:RadPanelItem Text="RadMenustrip" NavigateUrl="DefaultVB.aspx?page=menustrip" />
                        <telerik:RadPanelItem Text="RadTabStrip" NavigateUrl="DefaultVB.aspx?page=tabstrip" />
                        <telerik:RadPanelItem Text="RadToolStrip" NavigateUrl="DefaultVB.aspx?page=toolbarstrip" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Other projects">
                    <Items>
                        <telerik:RadPanelItem Text="SiteFinity" NavigateUrl="DefaultVB.aspx?page=sitefinity" />
                        <telerik:RadPanelItem Text="Reporting" NavigateUrl="DefaultVB.aspx?page=reporting" />
                        <telerik:RadPanelItem Text="RadAjax" NavigateUrl="DefaultVB.aspx?page=ajax" />
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
        <div class="qsf-result">
            <h2>Current page</h2>
            <p>
                <asp:Literal runat="server" ID="Literal1" /></p>
        </div>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance