菜鸟学堂
在线运行
源代码
<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:DataList id="cdcatalog"<br>runat="server"<br>cellpadding="2"<br>cellspacing="2"<br>borderstyle="inset"<br>backcolor="#e8e8e8"<br>width="100%"<br>headerstyle-font-name="Verdana"<br>headerstyle-font-size="12pt"<br>headerstyle-horizontalalign="center"<br>headerstyle-font-bold="True"<br>itemstyle-backcolor="#778899"<br>itemstyle-forecolor="#ffffff"<br>alternatingitemstyle-backcolor="#e8e8e8"<br>alternatingitemstyle-forecolor="#000000"<br>footerstyle-font-size="9pt"<br>footerstyle-font-italic="True"><br><br><HeaderTemplate><br>My CD Catalog<br></HeaderTemplate><br><br><ItemTemplate><br>"<FONT COLOR=#ff0000><%#Container.DataItem("title")%></FONT>" of <FONT COLOR=#ff0000><%#Container.DataItem("artist")%></FONT> - $<FONT COLOR=#ff0000><%#Container.DataItem("price")%></FONT><br></ItemTemplate><br><br><AlternatingItemTemplate><br>"<FONT COLOR=#ff0000><%#Container.DataItem("title")%></FONT>" of <FONT COLOR=#ff0000><%#Container.DataItem("artist")%></FONT> - $<FONT COLOR=#ff0000><%#Container.DataItem("price")%></FONT><br></AlternatingItemTemplate><br><br><FooterTemplate><br>© Hege Refsnes<br></FooterTemplate><br><br></asp:DataList><br></form><br><br></body><br></html><br> </HTML>
运行结果
在线运行
菜鸟学堂 edu.jb51.net