Rotator - Live XML

Data streamed live from http://feeds.feedburner.com/Telerik
  • 03:39
    Tue, Mar 21, 2017
    The Brosteins: Meet Developer Experts Nick & Mike Branstein
  • 06:29
    Wed, Mar 15, 2017
    Kendo UI for React in 2017
  • 02:33
    Fri, Mar 10, 2017
    Latest Test Studio Brings New Reports and HTML Results
  • 02:00
    Wed, Mar 8, 2017
    Build Your First App with UI for Xamarin and Visual Studio 2017
  • 03:00
    Tue, Mar 7, 2017
    Visual Studio 2017 RTM Is Here and We’re Ready
  • 06:35
    Wed, Mar 1, 2017
    Telerik Report Server R1 2017 Brings WhiteLabeling and More
  • 03:00
    Wed, Mar 1, 2017
    NativeScript, iOS Provisioning and More in AppBuilder 3.7
  • 01:00
    Wed, Mar 1, 2017
    Striking the Software Standardization Balance: Scale Up without the Bureaucracy
  • 05:02
    Tue, Feb 28, 2017
    Improved Support for Plugins in AppBuilder 3.7
  • 01:00
    Fri, Feb 24, 2017
    NativeScript, Sensors and Modern Applications
  • 06:58
    Wed, Feb 22, 2017
    DataFilter Comes to RadGridView with R1 2017 SP1
  • 12:00
    Wed, Feb 22, 2017
    Visual Studio 2017 & More in UI for WPF and Silverlight SP1
  • 07:52
    Mon, Feb 20, 2017
    ReportBooks Are Now Easy as Pie
  • 02:03
    Fri, Feb 17, 2017
    You're Invited to Help Make UI for Xamarin Documentation Great!
  • 11:25
    Mon, Feb 13, 2017
    Meet Steve McNiven-Scott, Developer Expert
    
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

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 span.__group0.This way you could easily deliver public news to your site using your own formatting and styling.
  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page AutoEventWireup="true" Inherits="Telerik.Web.Examples.Rotator.Functionality.LiveXML.DefaultCS"CodeFile="DefaultCS.aspx.cs" Language="C#"  %>

<!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">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" type="text/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">
        <div class="backElement">
            <div class="titleText">
                Data streamed live from <a href="http://feeds.feedburner.com/Telerik">http://feeds.feedburner.com/Telerik</a><br />
            </div>
            <telerik:RadRotator RenderMode="Lightweight" ID="RadRotator1" Skin="Silk" 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("be:published", NamespaceManager).ToString()) %>.png');">
                        <div class="dateTime">
                            <div class="time">
                                <%# (this.GetTimeOnly(XPath("be:published", NamespaceManager).ToString())) %>
                            </div>
                            <div class="date">
                                <%# (this.GetDateOnly(XPath("be:published", NamespaceManager).ToString()))%>
                            </div>
                        </div>
                        <div class="title">
                            <span>
                                <%# System.Web.HttpUtility.HtmlEncode(XPath("be:title", NamespaceManager).ToString())%>
                            </span>
                        </div>
                    </div>
                </ItemTemplate>
            </telerik:RadRotator>
            <asp:Label ID="lblMessage" Visible="false" CssClass="message" runat="server" />
        </div>
    </div>
    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?