RSS feed in Datalist

lwathe1

New member
Joined
Nov 13, 2008
Messages
2
Programming Experience
Beginner
I'm using a Datalist with an XML Datasource to consume a blog RSS feed, but the datalist is not updating when I update my blog. In other words, when I publish a new post, the datalist still only shows the old posts. Here's the code:

VB.NET:
        <asp:DataList ID="DataList1" runat="server" CellPadding="4" ForeColor="#333333" DataSourceID="XmlDataSource1">
            <ItemTemplate>
                <div style="text-align:left; float:left"><asp:Label runat="server" ID="LabelTitle" Text='<%# XPath("title", "<h2>{0}</h2>") %>'></asp:Label>
                <b>(The following is the latest post from <a href="http://stmaryscatholicyouth.blogspot.com">our blog</a>).</b></div>
                <br /><br />
                <div style="width:100%; text-align:justify; float:left"><%# XPath("description")%></div>
            </ItemTemplate>
        </asp:DataList>
        <asp:XmlDataSource ID="XmlDataSource1" runat="server" 
            DataFile="http://stmaryscatholicyouth.blogspot.com/feeds/posts/default?alt=rss" 
            XPath="rss/channel/item[position()=1]"></asp:XmlDataSource>

Any thoughts?
 
Back
Top