Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

FormDecorator / Partial Page Updates

A decorated zone containing an UpdatePanel

An UpdatePanel containing a decorated zone

Decorated zone
UpdatePanel

Server time: 11/23/2024 7:11:15 PM





UpdatePanel

Server time: 11/23/2024 7:11:15 PM

Decorated zone






  • RadFormDecorator and partial page updates

    RadFormDecorator is able to detect partial page updates and redecorate updated page regions automatically. Partial page updates are the result of an AJAX request that returns new HTML for portions of the page, most often the content of UpdatePanel controls.
    RadFormDecorator covers three scenarios with partial page updates involved:
    1. The decoration zone (set with DecorationZoneID property) is an UpdatePanel control

    2. An UpdatePanel contains a decorated zone

    3. A decorated zone contains an UpdatePanel


    All three scenarios are handled automatically, and the page is properly re-decorated after a partial page update.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.FormDecorator.PartialPageUpdates.DefaultVB" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag runat="server" ID="Headtag1"></qsf:HeadTag>
        <style type="text/css">
        fieldset
        {
          border: solid 1px #ccc;
          margin: 8px;
          
        }
        
        
        
        br
        {
            clear: both;
        }
        </style>
    </head>
    <body class="BODY">
        <form id="form1" runat="server">
            <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB" />
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            
            <qsf:InformationBox ID="InformationBox2" runat="server" Title="A decorated zone containing an UpdatePanel" Width="420" style="float: left; margin-right: 30px;"></qsf:InformationBox>
            
            <qsf:InformationBox ID="InformationBox3" runat="server" Title="An UpdatePanel containing a decorated zone" Width="420" style="float: left;"></qsf:InformationBox>
            
            
            <telerik:RadFormDecorator ID="RadFormDecorator2" runat="server" DecoratedControls="All" DecorationZoneID="ZoneID3"
                ></telerik:RadFormDecorator>
            <telerik:RadFormDecorator ID="RadFormDecorator3" runat="server" DecoratedControls="All" DecorationZoneID="ZoneID4"
                ></telerik:RadFormDecorator>
                       
            <div id="ZoneID4" style="width:420px; float: left; margin-right: 30px;">
                <fieldset style="width:390px;">
                    <legend>Decorated zone</legend>
                    <asp:RadioButtonList ID="RadioButtonList1" runat="server">
                        <asp:ListItem Text="Radiobutton 1"></asp:ListItem>
                        <asp:ListItem Text="Radiobutton 2"></asp:ListItem>
                        <asp:ListItem Text="Radiobutton 3"></asp:ListItem>
                    </asp:RadioButtonList>
                    <fieldset style="width:290px;">
                        <legend>UpdatePanel</legend>
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <h3>
                                    Server time:
                                    <%= DateTime.Now.ToString() %>
                                </h3>
                                <asp:CheckBox ID="CheckBox6" runat="server" Text="CheckBox2"></asp:CheckBox><br />
                                <asp:CheckBox ID="CheckBox7" runat="server" Text="CheckBox2"></asp:CheckBox><br />
                                <br />
                                <asp:Button ID="Button5" runat="server" Text="callback" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </fieldset>
                    <br />
                    <asp:Button ID="Button4" runat="server" Text="Postback" />
                </fieldset>
            </div>
               

            <div id="ZoneID2" style="width:420px; float: left;">
                
                <fieldset>
                    <legend>UpdatePanel</legend>
                    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <h3>
                                Server time:
                                <%= DateTime.Now.ToString() %>
                            </h3>
                            <div id="ZoneID3">
                                <fieldset style="width:290px;">
                                    <legend>Decorated zone</legend>
                                    <asp:RadioButtonList runat="server">
                                        <asp:ListItem Text="RadioButton 1" />
                                        <asp:ListItem Text="RadioButton 2" />
                                        <asp:ListItem Text="RadioButton 3" />
                                    </asp:RadioButtonList>
                                    <br />
                                    <br />
                                    <asp:CheckBox ID="Checkbox4" runat="server" Text="CheckBox 1" />
                                    <br />
                                    <asp:CheckBox ID="Checkbox5" runat="server" Text="CheckBox 2" />
                                    <br />
                                    <br />
                                    <asp:Button ID="Button2" runat="server" Text="callback" />
                                </fieldset>
                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </fieldset>
            </div>
         
            <qsf:Footer runat="server" ID="Footer1" />
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451