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

Server-side Events

  • info@telerik.com
    RadEditor 5.05
    Telerik RadEditor is the leading WYSIWYG rich-text editor for ASP.NET...
  • info@telerik.com
    RadRotator 2.0
    Telerik RadRotator is a multipurpose component for DHTML content rotation and personalization...
  • info@telerik.com
    RadGrid 1.04
    Telerik RadGrid is designed to eliminate the typical tradeoff of ASP.NET grid controls...
    

RadRotator has a server side event - ItemClick. The event supplies a special RadRotatorEventArgs class which contains reference to the item, that was clicked by the user. You can use that reference to obtain the Index of the item and use it in your own event handling logic.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • Styles.css
  • email.xml
<%@ Page AutoEventWireup="true" Inherits="Telerik.Web.Examples.Rotator.ServerEvents.DefaultCS"CodeFile="DefaultCS.aspx.cs" Language="C#"  %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="Styles.css" />
</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 no-bg">
        <telerik:RadRotator RenderMode="Lightweight" OnItemClick="Rotator1_ItemClick" ID="Rotator1" runat="server" Skin="Silk"
                            DataSourceID="xmlDataSource1" Width="331" Height="77" ItemHeight="77" ItemWidth="331"
                            ScrollDirection="Up">
            <ItemTemplate>
                <div class="apiContainer">
                    <img src="images/apiGrip.gif" height="8" width="327" alt="" style="border: 0px; margin: 0px;
                         vertical-align: top;" />
                    <div class="apiIcons">
                        <img src="images/apiIcons.gif" height="65" width="33" alt="" style="border: 0px;
                             padding-left: 5px; padding-right: 5px" />
                    </div>
                    <div class="apiContent">
                        <span class="apiFrom">
                        <%# XPath("From") %>
                        </span>
                        <br />
                        <span class="apiSubject">
                        <%# XPath("Subject")%>
                        </span>
                        <br />
                        <span class="apiMessage">
                        <%# XPath("Date")%>
                        </span>
                    </div>
                    <div class="apiControls">
                        <img src="images/apiControls.gif" width="33" height="65" style="border: 0px" alt="" />
                    </div>
                </div>
            </ItemTemplate>
        </telerik:RadRotator>
        <div style="display: none;" id="Div1" runat="server" class="eMailContainer">
            <div class="eMailTop">
                <img src="images/eMailTop.gif" width="640" height="12" style="border: 0px" alt="" />
            </div>
            <div class="eMailBody">
                <div class="eMailSubject">
                    Telerik controls
                </div>
                <div class="eMailFrom">
                    john@johnsmith.com
                </div>
                <div class="eMailTo">
                    To: <span class="eMail">info@telerik.com</span>
                </div>
                <hr class="eMailseparator" />
                <div class="message">
                    <p>
                        I spent six months testing and analysing the benefits of several asp.net component
                        suites. Telerik proved superior not only in terms of functionality and stability,
                        but their support is second to none. Furthermore their release schedule of new and
                        upgraded components is impressive and stability is not compromised despite this.
                        I would wholeheartedly recommend Telerik products to any of my fellow-programmers.
                    </p>
                </div>
            </div>
            <div class="eMailBottom">
                <img src="images/eMailBottom.gif" width="640" height="25" style="border: 0px" alt="" />
            </div>
        </div>
        <div style="display: none;" id="Div2" runat="server" class="eMailContainer">
            <div class="eMailTop">
                <img src="images/eMailTop.gif" width="640" height="12" style="border: 0px" alt="" />
            </div>
            <div class="eMailBody">
                <div class="eMailSubject">
                    Telerik controls
                </div>
                <div class="eMailFrom">
                    john@johnsmith.com
                </div>
                <div class="eMailTo">
                    To: <span class="eMail">info@telerik.com</span>
                </div>
                <hr class="eMailseparator" />
                <div class="message">
                    <p>
                        I have used your product for about 10 months now. My boss and my customers, some
                        of whom are web developers, think my work is incredible. I give credit to Telerik
                        controls for some of it, because they add such great functionality to my applications.
                        I have not even used all the features that come with your product, because there
                        is so much in the package. Mark Bleshenski -- Senior Solutions Architect Netsource
                        One
                    </p>
                </div>
            </div>
            <div class="eMailBottom">
                <img src="images/eMailBottom.gif" width="640" height="25" style="border: 0px" alt="" />
            </div>
        </div>
        <div id="Div3" style="display: none;" runat="server" class="eMailContainer">
            <div class="eMailTop">
                <img src="images/eMailTop.gif" width="640" height="12" style="border: 0px" alt="" />
            </div>
            <div class="eMailBody">
                <div class="eMailSubject">
                    Telerik controls
                </div>
                <div class="eMailFrom">
                    john@johnsmith.com
                </div>
                <div class="eMailTo">
                    To: <span class="eMail">info@telerik.com</span>
                </div>
                <hr class="eMailseparator" />
                <div class="message">
                    <p>
                        Thank-you for providing one of thee top asp.net control / component suites available
                        today. The Telerik Team continues to develop an increasing range of user friendly
                        and functional controls that permit excellent customisation and integration into
                        most of our projects. The online help and excellent documentation coupled with the
                        commitment and responsiveness of your support team make the Telerik controls a pleasure
                        to develop with.
                    </p>
                </div>
            </div>
            <div class="eMailBottom">
                <img src="images/eMailBottom.gif" width="640" height="25" style="border: 0px" alt="" />
            </div>
        </div>
    </div>
    <asp:XmlDataSource ID="xmlDataSource1" runat="Server" DataFile="email.xml"></asp:XmlDataSource>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance