Rotator

Controls

Rate this demo

Thank you for your post!

Rotator - Live XML

Data streamed live from http://blogs.telerik.com/Blogs.rss

  • 12:54
    Wed, Jun 19, 2013
    What’s New and Cool in AJAX Q2 2013 – Webinar Wrap up
  • 08:14
    Wed, Jun 19, 2013
    Replacing the Default SharePoint Navigation Menu with Telerik’s ASP.NET AJAX Menu
  • 06:49
    Wed, Jun 19, 2013
    Q2 2013 Official Release for WPF and Silverlight controls
  • 11:23
    Tue, Jun 18, 2013
    Meet RadCalendar for Windows 8 XAML
  • 11:22
    Tue, Jun 18, 2013
    RadCalendar for Windows 8 HTML
  • 08:43
    Tue, Jun 18, 2013
    What’s New and Awesome in Q2 2013 RadControls for WinForms Webinar Recap
  • 07:55
    Tue, Jun 18, 2013
    Resources to the RadControls for WPF/SL Q2 2013 Webinar Now Available
  • 04:28
    Tue, Jun 18, 2013
    Weekly Dose of Telerik Support Resources 06/18/2013
  • 11:01
    Mon, Jun 17, 2013
    Debug Decompiled Code with JustCode
  • 09:08
    Fri, Jun 14, 2013
    Telerik Control Panel Improvements – now with more products!
    
Live XML

RadRotator has support for live XML feeds. You can make use of this feature very easily - all you need to do is use a XmlDataSource source and set it to the URL of the live feed. Finally, you might need to set the XmlDataSource's XPath (e.g. "rss/channel/item" for RSS feeds).This way you could easily deliver public news to your site using your own formatting and styling.

C# VB
Show code in new window Demo isolation steps
<%@ Page AutoEventWireup="true" Inherits="Telerik.Web.Examples.Rotator.Functionality.LiveXML.DefaultCS"CodeFile="DefaultCS.aspx.cs" Language="C#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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>
    <title>ASP.NET Rotator Demo - Live XML</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
    <a href='<%# XPath("pubDate").ToString()%>' style="cursor: pointer; text-decoration: none; color: Black; background-image: url('IMAGES/Monday.png');"></a>
    <div style="width: 100%;">
        <div class="backElement">
            <div class="titleText">
                Data streamed live from <a href="http://blogs.telerik.com/Blogs.rss">http://blogs.telerik.com/Blogs.rss</a><br />
            </div>
            <br class="qsf-clear-float" />
            <telerik:RadRotator ID="RadRotator1" RotatorType="AutomaticAdvance" ScrollDirection="Up"
                ScrollDuration="2000" runat="server" Width="493"
                ItemWidth="493" Height="192" ItemHeight="64" FrameDuration="1" InitialItemIndex="-1"
                CssClass="rotator">
                <ItemTemplate>
                    <div class="itemTemplate" style="background-image: url('IMAGES/<%# this.GetDayOfWeek(XPath("pubDate").ToString()) %>.png');">
                        <div class="dateTime">
                            <div class="time">
                                <%# (this.GetTimeOnly(XPath("pubDate").ToString())) %>
                            </div>
                            <div class="date">
                                <%# (this.GetDateOnly(XPath("pubDate").ToString()))%>
                            </div>
                        </div>
                        <div class="title">
                            <span>
                                <%# System.Web.HttpUtility.HtmlEncode(XPath("title").ToString())%>
                            </span>
                        </div>
                    </div>
                </ItemTemplate>
            </telerik:RadRotator>
            <asp:Label ID="lblMessage" Visible="false" CssClass="message" runat="server" />
        </div>
    </div>
    </form>
</body>
</html>