Click to See Complete Forum and Search --> : [RESOLVED] Repeater - Databinder.eval not working..


GremlinSA
June 11th, 2008, 05:57 AM
I have two data repeaters on a single ASP page
the first <asp:Repeater id="MPList" runat="server">
<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th class="style1">Image</th>
<th>Description</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>

<td class="style3"><img src="<%#DataBinder.Eval(Container, "dataItem.Image")%>" alt="" />
</td>
------------ and the second <asp:Repeater id="MyFriends" runat="server">
<HeaderTemplate>
<table border="1" width="100%">
<tr>
<th class="style1">Image</th>
<th>Friend</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>

<td class="style3">
<img src="<%#DataBinder.Eval(Container, "dataitem.SmallPictureUrl")%>" alt="" />
</td>

<td class="style4" style="vertical-align: top">
Name :
<%#DataBinder.Eval(Container, "Dataitem.Name")%>
<br />
---------

I'm able to fill the first repeater with Dim DBListData As New List(Of List)
DBListData = DBList_Get(FacebookApplication1.UserID)

MPList.DataSource = DBListData
MPList.DataBind()

However the second list Dim Friends As Collections.Generic.ICollection(Of Facebook.Service.User)
Friends = FacebookApplication1.Service.Users.GetUsers(FacebookApplication1.Service.Friends.GetFriends(Facebook.Service.FriendFilter.AllFriends), vbNull)
MyFriends.DataSource = Friends
MyFriends.DataBind()

The second repeater has the right amount of rows, however the data fields are empty..

Any ideas ???

Gremmy...

GremlinSA
June 11th, 2008, 06:41 AM
Oooopss... It was not the repeater that gave me problems.. it was my Call to facebook..
Friends = FacebookApplication1.Service.Users.GetUsers _
(FacebookApplication1.Service.Friends.GetFriends _
(Facebook.Service.FriendFilter.AllFriends), vbNull) should be Friends = FacebookApplication1.Service.Users.GetUsers _
(FacebookApplication1.Service.Friends.GetFriends _
(Facebook.Service.FriendFilter.AllFriends), "")
After checking the calls and splitting the two i found that Facebooks developer articles are useless.. Quote "Fields: a comma-seperated list of fields, or null to get all fields"

Null = Pass a null variable (VBNull) , not a blank variable ("").. (Please, I know what i'm saying, I reasurched 'Null Vs Blank' for one of my articles...)

Well at least the problem is solved..