0
客户端
你好,我想使用jquery或javscript重新加载在规则的时间间隔后,客户端将DataList这样我可以在这里最新的RSS新闻是我的代码Realod DataList控件上的XmlDataSource
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="http://www.example.com/category/test/feed/"
XPath="rss/channel/item"></asp:XmlDataSource>
<asp:DataList ID="dlRss" runat="server" DataSourceID="XmlDataSource1">
<ItemTemplate>
<label style="color: #222222; float: left; font-size: 16px; margin-top: 5px; width: 190px;">
<%# XPath("title")%></label>
<label style="color: #444444; display: inline-block; font-size: 11px; margin-bottom: 5px;
width: 190px;">
<%# Convert.ToDateTime(XPath("pubDate")).ToShortDateString() + " @" + Convert.ToDateTime(XPath("pubDate")).ToShortTimeString()%></label>
<label style="color: #444444; display: inline-block; font-size: 13px; width: 190px;">
<%#XPath("description").ToString().Length <= 200 ? XPath("description") : XPath("description").ToString().Substring(0,200) + "...<a href='" + XPath("link").ToString() + "' target='_blank'>more</a>"%></label>
<br />
</ItemTemplate>
</asp:DataList>
谢谢,我想我应该用JSON和WedMehtods绑定DataList控件,因为页面是非常沉重的,我不想重装整个页面 – 2013-03-14 06:36:08