Click here to Skip to main content
13,000,636 members (39,884 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello friends,

In my application i have used the RSS feed. i have used the following code

<div class="news-blog">
                News and events<div class="news_scroll">
                    <asp:LinkButton ID="btnDown" runat="server" onclick="btnDown_Click"></asp:LinkButton>
                    <asp:LinkButton ID="btnUp" runat="server" onclick="btnUp_Click"></asp:LinkButton>
            <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile=""
                XPath="rss/channel/item [position()<=3]"></asp:XmlDataSource>
            <asp:DataList ID="DataList1" runat="server" DataSourceID="XmlDataSource1">
                    <div class="news-events">
                        <table width="100%">
                                    <div class="news-content">
                                    <asp:HyperLink ID="hypTitle" runat="server" Width="500px" Text='<%# XPath("title") %>'
                                        Target="_self" NavigateUrl='<%#XPath("link")%>'></asp:HyperLink>
                                </h5> </div><br />
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label1" runat="server" Text='<%# XPath("description") %>'
                                        Style="float: right"></asp:Label>
                        <br />

from this i have shown the 3 news. but when i click on up button i want to the news from 2nd to code behind i don't understand how can i change the positions of the news. i want just like XmlDataSource1.XPath = "rss/channel/item [position()<=3 && position()!=1]"; but it gives error. please help me.
Posted 18-Nov-12 19:58pm
Updated 18-Nov-12 20:10pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100