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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -