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 / Rotator Types

Configure rotator type
  • AutomaticAdvance
  • ButtonsOver
  • Buttons
  • SlideShow
  • SlideShowButtons
  • FromCode
  • Carousel
  • CarouselButtons
  • CoverFlow
  • CoverFlowButtons

  • When you set one of the following modes: Buttons, ButtonsOver or SlideshowButtons, you should add 40 pixels to the Width property. This is needed because by design buttons have dimentions 20x20 pixels.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="vb" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Rotator.RotatorTypes.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" />
        <style type="text/css">
            .rotatorBackground
            {
                float: left;
                margin-left: 50px;
                margin-top: 10px;
                width: 440px;
                height: 185px;
                border: solid 2px #dedede;
                -moz-border-radius: 15px;
                -webkit-border-radius: 15px;
            }
            .rotatorStyle
            {
                margin: 40px auto 0px;
            }
            .rotatorStyle .RotatorItem
            {
                margin:5px;
                height: 100px;
                width: 100px;
            }
            .rotatorCarouselStyle
            {
                margin: 0px auto;
            }
            .RotatorItem
            {
                border: solid 1px #dff3ff !important;
            }
            .mainDiv
            {
                margin-bottom: 20px;
            }
            .configurationPanel
            {
                width: 290px;
                border: 0px;
            }
        </style>
    </head>
    <body class="BODY">
        <form id="Form1" method="post" runat="server">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB" />
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="Server" Transparency="30"
            EnableSkinTransparency="false" BackColor="#E0E0E0">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel ID="AjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">
            <div class="mainDiv">
                <div class="rotatorBackground">
                    <%-- ItemWidth and ItemHeight include 2x5(pixels) margin and 1x2(pixels) border --%>
                    <telerik:RadRotator ID="RadRotator1" runat="server" Width="224px" Height="112px"
                        CssClass="rotatorStyle" ItemHeight="112" ItemWidth="112" ScrollDuration="500">
                        <Items>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/ANATR.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image1" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/ANTON.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image2" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/BOTTM.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image3" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/CACTU.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image3" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/CENTC.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image3" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/ERNSH.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image3" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/LAUGB.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image3" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/MAISD.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image3" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/MEREP.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                            <telerik:RadRotatorItem>
                                <ItemTemplate>
    <asp:Image runat="server" ID="Image3" ImageUrl='~/Rotator/Img/Northwind/Customers/Thumbs/OCEAN.jpg'
    CssClass="RotatorItem" AlternateText="Customer Image" />

                                </ItemTemplate>
                            </telerik:RadRotatorItem>
                        </Items>
                    </telerik:RadRotator>
                </div>
                <div style="float: right;">
                    <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Enabled="true" Title="Configure rotator type"
                        Expanded="true" HorizontalAlign="Left" Width="300" CssClass="configurationPanel">
                        <telerik:RadListBox ID="RotatorTypesList" runat="server" Width="300" AutoPostBack="true"
                            OnSelectedIndexChanged="ConfigureRotator">
                        </telerik:RadListBox>
                    </qsf:ConfiguratorPanel>
                </div>
                <div class="qsfClearFloat">
                    <!-- -->
                </div>
            </div>
        </telerik:RadAjaxPanel>
        <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