asp.netでasp:AccessDataSourceの使い方

サンプルコード
<%@ 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 startnews24</title>
</head>
<body>
<form id="form1″ runat="server">
<asp:DataList ID="dst_kono" runat="server" DataSourceID="adse" DataKeyField="CategoryID"
RepeatColumns="3″ RepeatDirection="Horizontal">
<ItemTemplate>
<table>
<tr>
<td style="width: 90px">
<asp:Label ID="lbl_catid" runat="server" Text='<%# Eval(“CategoryID") %>’></asp:Label>
</td>
</tr>
<tr>
<td style="width: 90px">
<asp:Label ID="lbl_descp" runat="server" Text='<%# Eval(“Description") %>’></asp:Label>
</td>
<td style="width: 90px">
<asp:Label ID="lbl_catname" runat="server" Text='<%# Eval(“CategoryName") %>’></asp:Label>
</td>
</tr>
</table>
<br />
<br />
</ItemTemplate>
</asp:DataList>
<asp:AccessDataSource ID="adse" runat="server"
DataFile="Northwind.mdb"
SelectCommand="SELECT * FROM [Catermo]"></asp:AccessDataSource>
</form>
</body>
</html>

VB.net

Posted by arkgame