菜鸟学堂
在线运行
源代码
<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="0" width="100%"><br><tr><br><th align="left">Title</th><br><th align="left">Artist</th><br><th align="left">Company</th><br><th align="left">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><SeparatorTemplate><br><tr><br><td colspan="6"><hr></td><br></tr><br></SeparatorTemplate><br><br><FooterTemplate><br></table><br></FooterTemplate><br><br></asp:Repeater><br></form><br><br></html><br></body><br> </HTML>
运行结果
在线运行
菜鸟学堂 edu.jb51.net