hi guys,
I am using a custom membership provider. I needed to bind a repeater to a membershipusercollection but the only way I could think of was this:
There is no method to return a lcollection of membership users by userid. I basically have a friends table with a userid and a frienduserid field. both are foreign keys to the user table. So say I am userid 1 and I have two friends userid 2 and userid 3.
I needed to get a collection of membership users who are my friends (user 2 and 3)
so I did this:
I get their id's and add them to to list(of Integer)Code:Dim lstAccountIDs As List(Of Integer) = bl.GetFriendsAccountByUserID(iUser) Dim mUsers As New MembershipUserCollection For Each a In lstAccountIDs mUsers.Add(Membership.GetUser(a)) Next
then i loop through the list and get the particular user by id and add them to a membershipusercollection object.
I now need to add paging to my repeater control that uses that collection as a datasource. However the membership provider doesn't give me the ability to specify a pageindex or pagesize etc. It gives me those options in the GetAllUsers function but I need it to work in the above scenario. Can anyone please suggest a way forward. Thanks


Reply With Quote

