Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# SQL menu database
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 18-Jun-12 21:03pm
Comments
Amit Bhoi at 19-Jun-12 3:36am
   
what u have done so far and asking for code
Sunnykumar08 at 19-Jun-12 4:47am
   
please share what you've tried yet.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
somy_j88 at 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)

  Print Answers RSS
0 Dnyaneshwar@Pune 604
1 thatraja 370
2 OriginalGriff 319
3 Sergey Alexandrovich Kryukov 241
4 Gihan Liyanage 194
0 OriginalGriff 737
1 Dnyaneshwar@Pune 604
2 Kornfeld Eliyahu Peter 505
3 Sergey Alexandrovich Kryukov 372
4 thatraja 370


Advertise | Privacy | Mobile
Web02 | 2.8.140902.1 | Last Updated 19 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100