I've been running into the following error:
"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."
I've seen a few threads which address this problem as it pertains to interdependency between two drop down lists, however my situation is somewhat different. I've been getting this error thrown inside the item template of a grid view. I am using Eval() to set the command argument property of an image button. The error occurs after the grid view data bound event is thrown, and after adding a watch, I can see that the grid view control itself contains a number of rows.
The object data source associated with this grid view has its select method dynamically chosen. The object type returned, however, is universal. One of the select methods uses an array of identities passed in from another control, this array is itself generated via data binding.
Odd as it seems, the above approach worked well for a period of time. If need be, I can post code snippets. The sheer size of the code might make restrict that, however.