Fatching Data from RSS Feed

<form id="form1" runat="server">
    <div>
        <asp:ListView ID="ListView1" runat="server" DataSourceID ="XmlDataSource1" >
        <LayoutTemplate>
            <br /><h2 style="color:Red">NIMISH GARG'S SPORTS BLOG...</h2>
            <div style="height:3px;background-color:blue"></div><br />
            <asp:PlaceHolder  ID="itemPlaceholder" runat="server" ></asp:PlaceHolder>
            <div style="height:3px;background-color:blue"></div><br />
        </LayoutTemplate>
        <ItemTemplate>
            <p><h3 style="color:Black"><%#XPath("title")%> &nbsp; &nbsp;<b style="font-size:x-small" onclick="javascript:window.open('<%#XPath("link")%>')">(CLICK HERE TO READ DETAILS)</b></h3>
            <h5><%#XPath("pubDate")%></h5>
            <h5><%#XPath("description")%></h5>
        </ItemTemplate>
        <ItemSeparatorTemplate>
        <div style="height:1px;background-color:Black"></div>
        </ItemSeparatorTemplate>
        </asp:ListView>
        <asp:XmlDataSource ID="XmlDataSource1" DataFile="http://sports.in.msn.com/rss/sports.aspx" XPath="rss/channel/item" runat="server"></asp:XmlDataSource>
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize=5 >
            <Fields>
                <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton=true ShowNextPageButton=true ShowFirstPageButton=true ShowPreviousPageButton=true />
            </Fields>
    </asp:DataPager>
    </div>
</form>

1 comment:

  1. Hi there Dear, are you really visiting this web site regularly, if so afterward you will definitely take good know-how.

    ReplyDelete