Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,
I want to create a vertical menu to show categories and subcategories.
the menu will have three steps, for example Monitor--> LED or LCD --> and then mark of the monitor.
I have three tables(Types, Products, sub products). I need the code for this menu.
I searched but I couldn't find any thing suitable. I need C# code and want to bind data from sql database.

thanks alot for helping,
Posted
Comments
Amit Bhoi 19-Jun-12 3:36am    
what u have done so far and asking for code
Sunny_Kumar_ 19-Jun-12 4:47am    
please share what you've tried yet.

1 solution

Your best bet is to create your own sitemap provider. There is an sqlSiteMapProvider that can be used in this situation.

http://msdn.microsoft.com/en-us/magazine/cc163657.aspx[^]

In essence the link above is how to create a sitemap provider by inheriting the base sitemap provider (as you would anyway) to create an sql version. You should be able to get from this what you need to do.

You could also create a more basic version using :

Binding Menu Control With Database[^]
Populating Menu Control in ASP.NET 2.0 - using different data sources[^]
http://aspdotnetcodebook.blogspot.co.uk/2008/04/how-to-create-database-driven-menu-in.html[^]
 
Share this answer
 
Comments
somy_j88 20-Jun-12 1:52am    
Thank you for answering,
I don't have any idea about siteMapProvider, I don't know how I should use it.
and about The link "populating menu control in ASP.net 2.0 ..." it is for two table and a menu that opens at two levels, I tried to expand it for three levels but I couldn't.

can any body help ma,
thanks for helping

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900