Hi,
I am trying to do design-time data binding to a custom control I have developed. I have an entity called PropertyPage and there are five PropertyPage entities in the PropertyPage set.
When I do a design-time binding of a PropertyPage field called PpPageTitle, Visual Studio inserts the following binding expression:
DataBinder.Eval(propertyPageCollection1, "[0].PpPageTitle")
When I run the web application, I get the following error:
Specified argument was out of the range of valid values. Parameter name: Index was out of range. Must be non-negative and less than the size of the collection.
My assumption is that it will return the PpPageTitle field of the first entity in the collection. Am I wrong? Am I correct in assuming that I can bind a single field from a single entity in the PropertyPageCollection to a field in my control? If so, can you please give me some direction?
If I have missed something basic in the documentation I apologize.
Thanks for your help.