I want to create the webpart in Visual studio 2010/2008 environment with microsoft given sharepoitn extensions. I have collection like
Home |As Parent |
Management|As Parent |
SubHome1 | As Child | Child of Home
SubHome2 | As Child | Child of Home
Download |As Parent |
I want to iterate one by one item. say this is datatable. if Lits item in Parent then need to dynamically add Menu item , if it is child , then want to add as sub menu item to respective menu item. I want to write code in c#. I know only we can create the html control in c# using HTMLGenericControl class. how to achieve this ? please guide.
You can use a user control and bind the data to the user control. In the user control you can read the datasource and build the javascript/html required for the menu. You can use JQuery to build the navigation menu. There are too many menu plugins available in JQuery.
http://designm.ag/resources/jquery-navigation-plugins/