Rotator - Live XML

Data streamed live from http://feeds.feedburner.com/Telerik
  • 05:03
    Fri, Dec 15, 2017
    What Developers Were Fired Up About In 2017: Top 5 JavaScript Blogs
  • 01:00
    Thu, Dec 14, 2017
    Get Going with Kendo UI & Vue: a GIF Guide
  • 12:42
    Thu, Dec 14, 2017
    Top 10 .NET Development Tweets that Broke the Internet in 2017
  • 01:30
    Wed, Dec 13, 2017
    Resources for Upgrading Your Hybrid Apps to NativeScript
  • 12:30
    Tue, Dec 12, 2017
    Planning an ASP.NET Web Forms Application: Controllers and Testing
  • 02:00
    Mon, Dec 11, 2017
    Top 10 Web Development Tweets that Broke the Internet in 2017
  • 09:21
    Thu, Dec 7, 2017
    Get Going with Kendo UI & React: A GIF Guide
  • 05:45
    Wed, Dec 6, 2017
    The Top 5 Benefits of React that Make Life Better
  • 09:41
    Mon, Dec 4, 2017
    The State of .NET in 2018: Better Web Apps with ASP.NET Core
  • 08:59
    Fri, Dec 1, 2017
    Choosing the JavaScript Framework for Your Next Enterprise-Grade App
  • 07:30
    Thu, Nov 30, 2017
    Bootstrap 4 and Angular: A Beginner’s Guide to Customizing a Theme
  • 05:24
    Thu, Nov 30, 2017
    A Brief User Guide on Fiddler Orchestra
  • 04:21
    Wed, Nov 29, 2017
    Prototyping ASP.NET Core Data Grids
  • 05:46
    Wed, Nov 22, 2017
    Top 5 Line of Business Features in Report Management Solutions
  • 09:45
    Tue, Nov 21, 2017
    How to Seamlessly Integrate Telerik Reporting into Your App
    
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?