views:

216

answers:

1

I am retrieving Objects from a collection and assigned objects and objects within objects to web user control from hosting web page.

<uc1:bookmarksList   runat ="server"   Link =<%#DataBinder.Eval(Container.DataItem, "OLinks")%>

where Olinks is the objects within current objects list in collections(e.g User is current object in collection) my question how to retrieve current object from collections in syntax

DataBinder.Eval(Container.DataItem..

+1  A: 

Eval or Bind methods already gets the current object of a collection. You're probably using Eval function in a databound control. Your databound control loops your collection and each loop it gets the current item of the collection. You should eval a property of your control in your collection. In your example it looks like you're binding the object itself.

Canavar