troubleshooting Question

Populating a dropdown navigation menu from a datasource - best practices

Avatar of Member_2_1242703
Member_2_1242703 asked on
ASP.NETWeb DevelopmentVisual Basic.NET.NET ProgrammingHTML
5 Comments1 Solution166 ViewsLast Modified:
I have an ASP.NET website (web forms) that pulls navigation menu items from a database table. Currently it is one menu list that populates 2 levels (menu item and some of those items have sub menu items.)

Currently I'm using a literal/DataList to display the <li> for each link. On the binding of the list, I'm searching the table for submenu items and essentially doing the same thing. This is all done on a master page.

As you can imagine, this causes for a lot of trips back/forth to the DB. I know there are a lot better way of doing this but I'm not really sure where to start. Populating this dropdown menu must be done from some sort of source. What is the best way to do this. I'm not really looking for a 3rd party control, though I suppose I'd entertain it if I could just drop it into my literal or some other simple method.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 5 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 5 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004