See Technical Demos of the New Features in the DevCraft R1 2017 Release Webinar. Save Your Seat!

Menu - Persisting Menu Settings

  • Home
  • Blog
  • Contacts
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

In this example you can see how to preserve the Selected Menu Item 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" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<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="RadMenu1" />

    <div class="demo-container size-medium">
        <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:RadMenu RenderMode="Lightweight" ID="RadMenu1" runat="server">
                <telerik:RadMenuItem Text="Home"></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Blog"></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Contacts"></telerik:RadMenuItem>

Find Assistance

Help Us Improve

Was this example helpful?