Kalibrate Development Guide

Website Implementation

SAMPLE CODE

Binding child containers to a Repeater Control.

 

Sub LoadList()

  'Create an instance of the ContainerManager
  Dim ConMgr As Kalibrate.Core.ContainerManager = New Kalibrate.Core.ContainerManager

  'Populate a generic collection of the Container object by passing the

  'current container to the ChildContainers method in the ContainerManager
  Dim Col As List(Of Kalibrate.OM.Container) = _

  ConMgr.ChildContainers(Kalibrate.Core.Context.Container)

  'Sort the collection
  Col.Sort(New Kalibrate.OM.Comparer(Of Kalibrate.OM.Container) _

  ("NavTitle", Kalibrate.OM.SortDirections.Ascending))

  'Bind it to the control
  Me.RptrChildPages.DataSource = Col
  Me.RptrChildPages.DataBind()
End Sub

 

 

<asp:Repeater ID="RptrChildPages" runat="Server">
<ItemTemplate>
    <a href="<%# Container.DataItem.Url %>"><%# Container.DataItem.NavTitle %></a>
</ItemTemplate>
</asp:Repeater>

YOU ARE HERE:
Tell Us Your Thoughts or Give Us Suggestions...
Email Address
Thoughts or Suggestions
Please enter the text from the image.