このコードを実行している間、<%Eval( "Firstname")%>で例外が発生しています。例外メッセージは次のとおりです。「Eval()、XPath()、Bind()などのデータバインディングメソッドは、データバインドされたコントロールのコンテキスト。」何をすべきか..私のコードは次のとおりです
<div>This is repeater
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<HeaderTemplate>
<table>
<tr>
<th>FirstName</th>
<th>LastName</th>
<th>City</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><% Eval("FirstName")%></td>
<td><% Eval("LastName")%></td>
<td><% Eval("City")%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT * FROM [Employees]">
</asp:SqlDataSource>
</div>