Rotator - Live XML

Data streamed live from http://feeds.feedburner.com/Telerik
  • 03:18
    Thu, Dec 5, 2019
    Telerik UI for Blazor 2.5.0 – Scheduler, Globalization and .NET Core 3.1 GA Compatibility!
  • 03:17
    Thu, Dec 5, 2019
    Globalization in Blazor UI
  • 07:39
    Wed, Dec 4, 2019
    5 Mobile App Design Trends You Should Know for 2020
  • 09:27
    Tue, Dec 3, 2019
    Localization in Blazor UI​
  • 11:06
    Mon, Dec 2, 2019
    Create, Modify & Export Documents with WordsProcessing for Xamarin.Forms
  • 09:05
    Mon, Dec 2, 2019
    Salvation Delivered by WebAssembly (Wasm)
  • 11:11
    Wed, Nov 27, 2019
    Healthcare Mobile App Design: Tips and Inspiration
  • 09:38
    Tue, Nov 26, 2019
    Creating a Single EXE Application with .NET Core
  • 05:42
    Tue, Nov 26, 2019
    Your Monthly November Fill of Telerik UI for ASP.NET Core
  • 06:21
    Mon, Nov 25, 2019
    Testing Dynamic Forms in Angular
  • 05:32
    Mon, Nov 25, 2019
    The Right Way to Design Mobile App Monetization Elements
  • 08:25
    Fri, Nov 22, 2019
    Reduce Self-Contained App Size with the Latest .NET Core Features
  • 08:15
    Thu, Nov 21, 2019
    JavaScript Fundamentals: Closures
  • 06:35
    Thu, Nov 21, 2019
    Discovering the Power of the Expander Control for Xamarin Forms
  • 08:04
    Wed, Nov 20, 2019
    JavaScript Fundamentals: Prototype Chains
    
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?