Rotator - Live XML

Data streamed live from http://feeds.feedburner.com/Telerik
  • 03:00
    Wed, Oct 18, 2017
    RadFileDialogs, RadWindow & More Improvements in UI for WPF
  • 02:00
    Wed, Oct 18, 2017
    Improved DataGrid, Autocomplete in UI for Xamarin R3 SP1
  • 01:00
    Wed, Oct 18, 2017
    Official RadSpreadsheet in UI for WinForms R3 2017 SP1
  • 01:05
    Tue, Oct 17, 2017
    “In Development” State for Tests in Latest Test Studio
  • 03:22
    Mon, Oct 16, 2017
    Telerik UI R3 2017 Release Webinar Wrap-Up
  • 05:03
    Fri, Oct 13, 2017
    4 Ways to Export from WPF and WinForms to Word and PDF Files
  • 12:32
    Thu, Oct 12, 2017
    Kendo UI Support for React & Vue Webinars
  • 12:30
    Wed, Oct 11, 2017
    Build Accessibility-Compliant Reports with Telerik Reporting
  • 12:00
    Tue, Oct 10, 2017
    Dynamic Data in the Kendo UI Grid
  • 12:55
    Mon, Oct 9, 2017
    Meet Dave Coffin, Developer Expert for NativeScript
  • 01:54
    Fri, Oct 6, 2017
    Modernizing One Hybrid App at a Time—Free Telerik Platform Webinar
  • 01:00
    Fri, Oct 6, 2017
    Binding Kendo UI Chart and Editable Kendo UI Grid to the Same Data
  • 04:08
    Thu, Oct 5, 2017
    Need a DataGrid for Your UWP App?
  • 12:30
    Wed, Oct 4, 2017
    Kendo UI R3 2017 Release Webinar Recap
  • 03:46
    Tue, Oct 3, 2017
    .NET DevChat: Responsive Web Apps with ASP.NET MVC and Bootstrap 4
    
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?