while i am running this code an exception is occuring at <%Eval("Firstname")%>.. the exception message is "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control." what to do..my code is as follows
<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>
I think you are missing the
#
symboltry: