asp教程.net datalist 绑定access数据库教程方法
<%@ page language="vb" %>
<!doctype html public "-//w3c//dtd xhtml 1.1//en" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>datalist from access</title>
</head>
<body>
<form id="form1" runat="server">
<asp:datalist id="datalist1" runat="server" datasourceid="accessdatasource1" datakeyfield="categoryid"
repeatcolumns="3" repeatdirection="horizontal">
<itemtemplate>
<table>
<tr>
<td style="width: 100px">
<asp:label id="label1" runat="server" text='<%# eval("categoryid") %>'></asp:label>
</td>
</tr>
<tr>
<td style="width: 100px">
<asp:label id="label2" runat="server" text='<%# eval("description") %>'></asp:label>
</td>
<td style="width: 100px">
<asp:label id="label3" runat="server" text='<%# eval("categoryname") %>'></asp:label>
</td>
</tr>
</table>
<br />
<br />
</itemtemplate>
</asp:datalist>
<asp:accessdatasource id="accessdatasource1" runat="server"
datafile="northwind.mdb"
selectcommand="select * from [categories]"></asp:accessdatasource>
</form>
</body>
</html>