I wouldn't suggest doing it this way, but for the sake of brevity for you, the solution to this problem is to change your code from <% Eval("date_uploaded"); %> to <%# Eval("date_uploaded") %>. The <% %> syntax is effectively a wrapper for Response.Write, so
it doesn't allow the use of Eval, XPath, or Bind. The <%# %> syntax is only called when the parent control is being data bound, therefore it allows Eval.
Marked as answer by rexlin on Nov 29, 2006 01:30 AM
NikoKardia
Member
111 Points
24 Posts
Re: Error "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the contex...
Nov 26, 2006 01:02 AM|LINK