我正在努力将 FolderID 整数设置为 FolderList 集合上的 FolderID 属性。FolderList 绑定到外部中继器。我见过的大多数示例都使用 DataTables 而不是自定义集合。我环顾四周,真的找不到任何可以帮助我的东西。
'--------------------------------------------------------
'Protected Sub Page_Load()
'--------------------------------------------------------
'.
'.
'.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'----------------------------------------------------
'Output
'----------------------------------------------------
'.
'.
'.
With Folders
'------------------------------------------------
'Data
'------------------------------------------------
'.
'.
'.
.DataSource = New FolderList(1)
'------------------------------------------------
'Bind
'------------------------------------------------
'.
'.
'.
.DataBind()
End With
End Sub
'--------------------------------------------------------
'Protected Sub Folders_ItemDataBound()
'--------------------------------------------------------
'.
'.
'.
Private Sub Folders_ItemDataBound(sender As Object, e As RepeaterItemEventArgs) Handles Folders.ItemDataBound
'----------------------------------------------------
'Declarations
'----------------------------------------------------
'.
'.
'.
Dim Item As Repeater = e.Item.FindControl("Files")
'----------------------------------------------------
'Output
'----------------------------------------------------
'.
'.
'.
With Item
Dim FolderID As Int32 = 1
'------------------------------------------------
'Data
'------------------------------------------------
'.
'.
'.
.DataSource = New PageList(FolderID)
'------------------------------------------------
'Bind
'------------------------------------------------
'.
'.
'.
.DataBind()
End With
End Sub