topical media & game development

talk show tell print

professional-xml-15-Listing-15-21.txt / txt



  <%@ Page Language="C#"%>
  
  <html xmlns="http://www.w3.org/1999/xhtml" >
  <head runat="server">
      <title>XmlDataSource</title>
  </head>
  <body>
      <form id="form1" runat="server">
          <asp:DataList ID="DataList1" Runat="server" DataSourceID="XmlDataSource1">
              <HeaderTemplate>
                  <table border="1" cellpadding="3">
              </HeaderTemplate>
              <ItemTemplate>
                  <tr><td><b><%# XPath("title") %></b><br />
                  <i><%# XPath("pubDate") %></i><br />
                  <%# XPath("description") %></td></tr>
              </ItemTemplate>
              <AlternatingItemTemplate>
                  <tr bgcolor="LightGrey"><td><b><%# XPath("title") %></b><br />
                  <i><%# XPath("pubDate") %></i><br />
                  <%# XPath("description") %></td></tr>
              </AlternatingItemTemplate>
              <FooterTemplate>
                  </table>
              </FooterTemplate>
          </asp:DataList>
  
          <asp:XmlDataSource ID="XmlDataSource1" Runat="server" 
           DataFile="http://geekswithblogs.net/evjen/Rss.aspx" 
           XPath="rss/channel/item">
          </asp:XmlDataSource>
      </form>
  </body>
  </html>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.