菜鸟学堂
在线运行
源代码
<HTML> <HEAD></HEAD> <FONT FACE="Verdana, Arial, Helvetica" SIZE=2> <FONT COLOR=#ff0000><%@ Import Namespace="System.Data" %></FONT><br><br><FONT COLOR=#0000ff><script runat="server"><br>sub Page_Load<br>if Not Page.IsPostBack then<br> dim mycdcatalog=New DataSet<br> mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))<br> cdcatalog.DataSource=mycdcatalog<br> cdcatalog.DataBind()<br>end if<br>end sub<br></script></FONT><br><br><!DOCTYPE html><br><html><br><body><br><br><form runat="server"><br><asp:Repeater id="cdcatalog" runat="server"><br><br><HeaderTemplate><br><table border="1" width="100%"><br><tr><br><th>Title</th><br><th>Artist</th><br><th>Company</th><br><th>Price</th><br></tr><br></HeaderTemplate><br><br><ItemTemplate><br><tr><br><td><FONT COLOR=#ff0000><%#Container.DataItem("title")%></FONT> </td><br><td><FONT COLOR=#ff0000><%#Container.DataItem("artist")%></FONT> </td><br><td><FONT COLOR=#ff0000><%#Container.DataItem("company")%></FONT> </td><br><td><FONT COLOR=#ff0000><%#Container.DataItem("price")%></FONT> </td><br></tr><br></ItemTemplate><br><br><AlternatingItemTemplate><br><tr bgcolor="#e8e8e8"><br><td><FONT COLOR=#ff0000><%#Container.DataItem("title")%></FONT> </td><br><td><FONT COLOR=#ff0000><%#Container.DataItem("artist")%></FONT> </td><br><td><FONT COLOR=#ff0000><%#Container.DataItem("company")%></FONT> </td><br><td><FONT COLOR=#ff0000><%#Container.DataItem("price")%></FONT> </td><br></tr><br></AlternatingItemTemplate><br><br><FooterTemplate><br></table><br></FooterTemplate><br><br></asp:Repeater><br></form><br><br></html><br></body><br> </HTML>
运行结果
在线运行
菜鸟学堂 edu.jb51.net