You just set the datasource of the repeater to the function that returns the data from the database.
Code:
sub Page_Load()
If Not IsPostback then
repeater1.Datasource = BLL.GetData()
repeater1.Databind()
End If
End Sub
Code:
<asp:repeater id="repeater1" runat="server" OnItemDataBind="repeater1_OnItemDataBind">
.
.
</asp:repeater>
Code:
Sub repeater1_OnItemDataBind(ByVal s As Object, ByVal e As RepeaterItemEventArgs)
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItem.AlternatingItem then
Dim objBOL As BOLObject = e.Item.DataItem
If objBOL.your_property = "whatever" then
'do this
End if
End If
End Sub
Hope that helps.
Bookmarks