ASP.NET HTML 控件 用 重复
asp.net html 控件 用 重复repeater2
<%@ import namespace="system.data" %>
<script runat="server">
sub page_load
if not page.ispostback then
dim mycdcatalog=new dataset
mycdcatalog.readxml(mappath("cdcatalog.xml"))
cdcatalog.datasource=mycdcatalog
cdcatalog.databind()
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<asp:repeater id="cdcatalog" runat="server">
<headertemplate>
<table border="1" width="100%">
<tr>
<th>title</th>
<th>artist</th>
<th>company</th>
<th>price</th>
</tr>
</headertemplate>
<itemtemplate>
<tr>
<td><%#container.dataitem("title")%> </td>
<td><%#container.dataitem("artist")%> </td>
<td><%#container.dataitem("company")%> </td>
<td><%#container.dataitem("price")%> </td>
</tr>
</itemtemplate>
<alternatingitemtemplate>
<tr bgcolor="#e8e8e8">
<td><%#container.dataitem("title")%> </td>
<td><%#container.dataitem("artist")%> </td>
<td><%#container.dataitem("company")%> </td>
<td><%#container.dataitem("price")%> </td>
</tr>
</alternatingitemtemplate>
<footertemplate>
</table>
</footertemplate>
</asp:repeater>
</form>
</html>
</body>
<script runat="server">
sub page_load
if not page.ispostback then
dim mycdcatalog=new dataset
mycdcatalog.readxml(mappath("cdcatalog.xml"))
cdcatalog.datasource=mycdcatalog
cdcatalog.databind()
end if
end sub
</script>
<!doctype html>
<html>
<body>
<form runat="server">
<asp:repeater id="cdcatalog" runat="server">
<headertemplate>
<table border="1" width="100%">
<tr>
<th>title</th>
<th>artist</th>
<th>company</th>
<th>price</th>
</tr>
</headertemplate>
<itemtemplate>
<tr>
<td><%#container.dataitem("title")%> </td>
<td><%#container.dataitem("artist")%> </td>
<td><%#container.dataitem("company")%> </td>
<td><%#container.dataitem("price")%> </td>
</tr>
</itemtemplate>
<alternatingitemtemplate>
<tr bgcolor="#e8e8e8">
<td><%#container.dataitem("title")%> </td>
<td><%#container.dataitem("artist")%> </td>
<td><%#container.dataitem("company")%> </td>
<td><%#container.dataitem("price")%> </td>
</tr>
</alternatingitemtemplate>
<footertemplate>
</table>
</footertemplate>
</asp:repeater>
</form>
</html>
</body>
相关文章
- ASP.NET 教程
- ASP.NET Web Pages 对象
- ASP.NET Web Pages 文件
- ASP.NET Web Pages 类参考手册
- ASP.NET MVC 数据库
- ASP.NET Web Forms 教程
- ASP.NET 服务器控件
- ASP.NET ViewState
- ASP.NET TextBox 控件
- ASP.NET DataList 控件
- ASP.NET CompareValidator 控件
- ASP.NET Calendar 控件
- ASP.NET Literal 控件
- ASP.NET TableCell 控件
- WebSecurity CurrentUserName 属性
- ASP.NET HTML 控件 DataList
- ASP.NET HTML 控件 Image
- Listbox
- ASP.NET HTML 控件 Panel
- RadiobuttonList