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

Built-In Dock State Persistence

RadDock 1
  • Collapse
  • Close
RadDock 2
  • Collapse
  • Close

  • Demo Configurator
Choose a layout persistence repository type:
RadDockLayout provides a built-in long-term persistence mechanism, which allows you to store the RadDock state after the page is closed. This is achieved by setting the EnableLayoutPersistence property of RadDockLayout to true and selecting a storage type via the property LayoutPersistenceRepositoryType. Optionally, you can configure LayoutRepositoryID, which gets or sets the key identifier of the stored RadDocks' states and is useful when you need to save a unique state for several users.
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Language="vb" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Dock.BuiltInDockStatePersistence.DefaultVB"CodeFile="DefaultVB.aspx.vb"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ 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 href="styles.css" rel="stylesheet" />
</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-wide">
        <telerik:RadDockLayout runat="server" ID="RadDockLayout1" EnableLayoutPersistence="true" LayoutPersistenceRepositoryType="Cookies"
            LayoutRepositoryID="DockLayout">
            <telerik:RadDockZone runat="server" ID="RadDockZone1" Width="300" MinHeight="200"
                Style="float: left; margin-right: 20px;">
                <telerik:RadDock RenderMode="Lightweight" runat="server" ID="RadDock1" Title="RadDock 1" Width="300" Height="100" CssClass="higherZIndex">
                </telerik:RadDock>
            </telerik:RadDockZone>
            <telerik:RadDockZone Width="300" MinHeight="200" runat="server" ID="RadDockZone2"
                Style="float: left;">
                <telerik:RadDock RenderMode="Lightweight" runat="server" ID="RadDock2" Title="RadDock 2" Width="300" Height="100" CssClass="higherZIndex">
                </telerik:RadDock>
            </telerik:RadDockZone>
            <br class="qsf-clear-float" />
        </telerik:RadDockLayout>
        <input type="hidden" name="PersistenceRepositoryTypeDropDown" value="<%= DockLayoutPersistenceRepositoryType.UniqueID %>" />
    </div>
    <qsf:ConfiguratorPanel ID="ConfiguratorPanel1" runat="server">
        <Views>
            <qsf:View>
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server" Size="Wide">
                    Choose a layout persistence repository type:
                    <qsf:ComboBox ID="DockLayoutPersistenceRepositoryType" runat="server">
                        <Items>
                            <telerik:RadComboBoxItem Text="Cookies" Value="Cookies" />
                            <telerik:RadComboBoxItem Text="Custom" Value="Custom" />
                            <telerik:RadComboBoxItem Text="FileSystem" Value="FileSystem" />
                            <telerik:RadComboBoxItem Text="None" Value="None" />
                        </Items>
                    </qsf:ComboBox>
                    <qsf:Button runat="server" ID="ButtonPostback" Text="Save State">
                    </qsf:Button>
                </qsf:ConfiguratorColumn>
            </qsf:View>
        </Views>
    </qsf:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance