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

Rotator / Image Gallery

preview
Image details:
Name: 
Keywords: 
Comments: 
  • gallery image
    Images/thumb1.gif
  • gallery image
    Images/thumb2.gif
  • gallery image
    Images/thumb3.gif
  • gallery image
    Images/thumb4.gif
  • gallery image
    Images/thumb5.gif
  • gallery image
    Images/thumb6.gif
  • gallery image
    Images/thumb7.gif
    

  • Image Gallery

    This example demonstrates integration between RadRotator and the Ajax controls. The example also shows how to update form data on the server using Ajax requests.
    Select an image from the gallery to see it and display its details. Modify the details and the rotator will be updated with the new data.

Source Code

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

    <%@ 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 ID="Headtag1" runat="server" />
        <link href="Styles.css" type="text/css" rel="stylesheet" />
        <style type="text/css">
        .itemTemplate
        {
            text-align:center;
            padding:20px;
            border: solid 1px #dddddd !important;
         }
        </style>
    </head>
    <body class="BODY">
        <form id="Form1" method="post" runat="server">
            <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB" />
        <telerik:RadScriptManager ID="ScriptManager1" runat="server">
        </telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="LoadingPanel1">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="thumbRotator">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="imagePreview" />
                            <telerik:AjaxUpdatedControl ControlID="detailsPanel" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="UpdateButton">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="detailsPanel" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Transparency="30" EnableSkinTransparency="false"
                BackColor="#E0E0E0">
            </telerik:RadAjaxLoadingPanel>
            <table width="743" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td style="height: 22px">
                        <img src="Images/White.gif" height="22" width="60" alt="" style="float: left;" /></td>
                    <td style="height: 22px">
                        <img src="Images/cornerLeftTop.gif" height="22" width="50" alt="" style="float: left;" /></td>
                    <td style="height: 22px">
                        <img src="Images/topLeft.gif" height="22" width="292" alt="" style="float: left;" /></td>
                    <td style="height: 22px">
                        <img src="Images/topRight.gif" height="22" width="280" alt="" style="float: left;" /></td>
                    <td style="height: 22px">
                        <img src="Images/cornerRightTop.gif" height="22" width="62" alt="" style="float: left;" /></td>
                </tr>
                <tr>
                    <td>
                        <img src="Images/whiteMiddle.gif" height="243" width="60" alt="" style="float: left;" /></td>
                    <td>
                        <img src="Images/leftFrame.gif" height="243" width="50" alt="" style="float: left;" /></td>
                    <td class="previewPane">
                        <div style="margin-top: 20px">
    <asp:Image ID="imagePreview" runat="server" ImageUrl="Images/spacer.gif" Height="192px"
    Width="272px" AlternateText="preview" BorderWidth="0"></asp:Image></div>

                    </td>
                    <td class="infoPane">
                        <div class="infoPaneBg" runat="server" id="detailsPanel">
                            <div class="imageDetailsHeader">
                                Image details:</div>
                            <div id="viewPanel">
                                <div class="details">
                                    <strong>Name:</strong>&nbsp;
                                    <asp:Label ID="labelImageName" runat="server"></asp:Label></div>
                                <div class="details">
                                    <strong>Keywords:</strong>&nbsp;
                                    <asp:Label ID="labelImageKeywords" runat="server"></asp:Label></div>
                                <div class="details">
                                    <strong>Comments:</strong>&nbsp;
                                    <asp:Label ID="labelImageComments" runat="server"></asp:Label></div>
                                <div class="details" style="margin-top: 5px; margin-left: 28px">
                                    <a href="javascript:buttonEditClicked();">
                                        <img style="border-top-style: none; border-right-style: none; border-left-style: none;
                                            border-bottom-style: none" height="20" alt="" src="Images/editBtn.gif" width="44" /></a></div>
                            </div>
                            <div style="display: none" id="editPanel">
                                <div class="details">
                                    <strong>Name:</strong>&nbsp;
                                    <asp:TextBox ID="textImageName" runat="server" CssClass="detailsTxtBox"></asp:TextBox></div>
                                <div class="details">
                                    <strong>Keywords:</strong>&nbsp;
                                    <asp:TextBox ID="textImageKeywords" runat="server" CssClass="detailsTxtBox"></asp:TextBox></div>
                                <div class="details">
                                    <strong>Comments:</strong>&nbsp;
                                    <asp:TextBox ID="textImageComments" runat="server" CssClass="detailsTxtBox"></asp:TextBox></div>
                                <div class="details">
                                    &nbsp;<asp:LinkButton CssClass="editBtns" ID="UpdateButton" runat="Server" OnClick="UpdateButton_Click">OK</asp:LinkButton> <a class="editBtns"
                                        href="javascript:buttonCancelClicked();">Cancel</a></div>
                            </div>
                        </div>
                    </td>
                    <td>
                        <img src="Images/rightFrame.gif" height="243" width="62" alt="" style="float: left;" /></td>
                </tr>
                <tr>
                    <td>
                        <img src="Images/whiteShadow.gif" height="117" width="60" alt="" /></td>
                    <td>
                        <img src="Images/left.gif" id="img_left" height="117" width="50" alt="" style="cursor: pointer" /></td>
                    <td colspan="2" class="thumbsViewer">
                        <telerik:RadRotator ID="thumbRotator" runat="server" RotatorType="ButtonsOver" Width="572"
                            Height="118px" ItemHeight="118" ItemWidth="145" FrameDuration="1" ScrollDirection="Left,Right" OnItemClick="ShowImage">
                            <ItemTemplate>
                                <div class="itemTemplate">
                                    <img src='<%# DataBinder.Eval(Container.DataItem, "Image") %>' alt='gallery image'
                                        class="RotatorImage" /><br />
                                    <%# DataBinder.Eval(Container.DataItem, "Image") %>
                                </div>
                            </ItemTemplate>
                            <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />
                        </telerik:RadRotator>
                    </td>
                    <td>
                        <img src="Images/right.gif" id="img_right" height="117" width="62" alt="" style="cursor: pointer" /></td>
                </tr>
            </table>
            <telerik:RadCodeBlock ID="rcb1" runat="Server">
                <script type="text/javascript">
                    function buttonEditClicked()
                    {
                        var panelViewImage = $get("viewPanel");
                        panelViewImage.style.display = "none";
                        var panelEditImage = $get("editPanel");
                        panelEditImage.style.display = "block";
                    }
                    function buttonCancelClicked()
                    {
                        var panelViewImage = $get("viewPanel");
                        panelViewImage.style.display = "block";
                        var panelEditImage = $get("editPanel");
                        panelEditImage.style.display = "none";
                    }
                </script>
            </telerik:RadCodeBlock>
            <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