Recursively looping through category collection with a sub category collection.
Dim cl As New CategoryList
cl = Category.GetChildCategories(1)
Dim c As New Category
Dim cc As New Category
For Each c In cl
GetChildren(c)
Next
Function GetChildren(ByVal c As Category) As String
Response.Write(c.Name & "<BR>")
Dim cc As New Category
If c.ChildCategories.Count > 0 Then
For Each cc In c.ChildCategories
GetChildren(cc)
Next
End If
End Function
Print | posted on Wednesday, November 09, 2005 8:17 PM