XMLDatasource / DataList

S

Sean

I am experiencing a strange problem using the XMLDataSource and DataList
controls which I cannot seem to resolve. I am using the controls to read and
display a variety of RSS feeds. On my local machine everything runs fine and
the latest data is downloaded and displayed correctly. On the remote server
this was also running fine but since a few days ago the controls will only
show old data even though I know the feeds have been updated. The new data
is retrieved fine on the local machine with the same code. I cannot figure
out why the remote machine seems to be cacheing an old set of data. Is it
possible my host has disabled the ability for XMLDataSource to retrieve new
data?

TIA for any advice.

This is a snippet of the code:

<asp:XmlDataSource ID="XmlDataSource1" runat="server"
DataFile="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml"
XPath="rss/channel/item [position()<=15]">
</asp:XmlDataSource>
<asp:DataList ID="DataList1" runat="server" DataSourceID="XmlDataSource1">
<ItemTemplate>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<span class="rss_item_hlines_wide">
<a href="<%#XPath("link")%>"
target="_blank"><%#XPath("title")%></a>
</span>
<span class="rss_item_date_wide">
<%#XPath("pubDate")%>
</span>
</td>
</tr>
<tr>
<td>
<span class="rss_desc">
<%#XPath("description")%>
</span>
<hr />
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
 
V

vijeta

Try adding this piece of code:

Response.Cache.SetCacheability(HttpCacheability.NoCache);

Thanx,
Vijeta
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top