I need to populate an ASP.NET menu control with hierarchical structure with menu items that can be constantly changed, from a database (categories with n levels of sub categories).
There are some approaches for that and I would like to hear which one is the most efficient one.
I have those in mind:
- Retrieving data from database and converting it to xml then transforming it with customized XSLT file and binding it to Menu control
- Retrieving data from database and while looping through (recursive), inserting menu items and children to the menu control
- SQL Site Map Provider (thanks to Made4Print)
- Something else?