ASP.NET HTML 控件 Repeater
asp.net html 控件 repeater
<%@ 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>
<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>
<footertemplate>
</table>
</footertemplate>
</asp:repeater>
</form>
</html>
</body>
相关文章
- ASP.NET Web 的 C# 和 VB 实例
- ASP.NET Razor 标记
- ASP.NET Razor C# 循环和数组
- ASP.NET MVC Web 应用程序
- ASP.NET MVC 页面和布局
- ASP.NET 服务器控件
- ASP.NET Web 表单
- ASP.NET ArrayList
- ASP.NET HTML 服务器控件
- ASP.NET RegularExpressionValidator 控件
- ASP.NET Calendar 控件
- ASP.NET Label 控件
- ASP.NET BulletedList 控件
- ASP.NET TableCell 控件
- ASP.NET XML 控件
- WebSecurity GetCreateDate 方法
- WebSecurity GetUserId 方法
- HTML Anchor
- HTML InputCheckbox
- HTML InputHidden