Monday, May 18, 2015

C# nested repeater for a menu with child items

For a two layered menu (parent menu items that can have child items) in C# the following solution can be used.

A list of TopMenu can be assigned to the parent repeater. This will output the first level (parent items) and the on data bound event will then pass the children (if any) to the child repeater. This could be extended to a third level by adding another list of menu items to the child and adding a third repeater.

No comments:

Post a Comment