Click here to Skip to main content
12,070,351 members (50,362 online)
Rate this:
 
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 22:03pm
Comments
Amit Bhoi 19-Jun-12 3:36am
   
what u have done so far and asking for code
Sunnykumar08 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web03 | 2.8.160208.1 | Last Updated 19 Jun 2012
Copyright © CodeProject, 1999-2016
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