asp.net - problem with repeater -
while running code exception occuring @ <%eval("firstname")%>.. exception message "databinding methods such eval(), xpath(), , bind() can used in context of databound control." do..my code follows
<div>this 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 * [employees]"> </asp:sqldatasource> </div>
i think missing #
symbol
try:
<%# eval("firstname") %>
Comments
Post a Comment