Thursday, December 11, 2008

"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."

If you see this error in the code behind function, while trying to do Asp.Net DataList formatting (as I saw in the 4GuysFromRolla articles on DataList's and ListView's - http://aspnet.4guysfromrolla.com/articles/091708-1.aspx then you might have made the same mistake that I did:
  • I missed out the # at the start of the <%# ... %> tag in the ASPX code.
Took a little while to debug that one!

"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."

No comments:

Post a Comment