Ticker - Weather Forecast

  • Friday
    max day
    18oC
    min night
    10oC
  • Friday
    max day
    22oC
    min night
    13oC
  • Friday
    max day
    21oC
    min night
    11oC
    
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

This example demonstrates how easy it is to build a widget that displays information about the weather forecast with the help of RadRotator and RadTicker.

  • DefaultCS.aspx
  • styles.css
  • forecast.xml
<%@ Page Language="C#" AutoEventWireup="true"  %>

<%@ 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 runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="Styles.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="top">
            <img src="images/weather.gif" alt="" width="402" height="20" /></div>
        <telerik:RadRotator RenderMode="Lightweight" ID="RadRotator1" runat="server" DataSourceID="XmlDataSource1"
            FrameDuration="4000" ScrollDuration="500" ScrollDirection="Up" Height="120px"
            Width="403px">
            <ItemTemplate>
                <div class="details">
                    <div class="day">
                        <img src="<%# XPath("Image") %>" width="93" height="94" alt="Friday" /></div>
                    <div class="paneCenter">
                        <div class="paneCenter_Text">
                            <%# XPath("Temperature") %>
                        </div>
                    </div>
                    <div class="paneDetails">
                        <div class="paneDetails_Text" style="text-align: left">
                            <telerik:RadTicker ID="ticker1" runat="server">
                                <Items>
                                    <telerik:RadTickerItem Text='<%# XPath("Ticker")%>'></telerik:RadTickerItem>
                                </Items>
                            </telerik:RadTicker>
                        </div>
                    </div>
                </div>
            </ItemTemplate>
        </telerik:RadRotator>
        <div class="bottom"></div>
    </div>
    <asp:XmlDataSource ID="xmlDataSource1" runat="server" DataFile="forecast.xml"></asp:XmlDataSource>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?