Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to asp.net mvc and Jquery.

I want to display sidemenu in each and every page.
This sidemenu should bind dynamically by getting list of values from database.
i.e bind them as an anchor tags. When clicking on each link need to redirect to corresponding views.

I googled it but i didn't find solution.

Please guide me.

Thanks in advance
Posted
Comments
incaunu 11-Jan-12 15:43pm    
You need a master page, and a repeater to which you set some data to do the bind and that generates your sidemenu.

1 solution

Use .Ascx files(webusercontrol) to create the Left menu and Inside Ascx.cs file write the data base actions

XML
<asp:Menu ID="Menu1" DataSourceID="xmlDataSource" runat="server"
            DynamicHorizontalOffset="2" StaticSubMenuIndent="10px" Width="145px"
        OnMenuItemClick="Menu1_MenuItemClick" >

          <DataBindings>
            <asp:MenuItemBinding DataMember="MenuItem"
             TextField="Text" ToolTipField="ToolTip" />
       
       </asp:Menu>



You have to use xmlDataSource (.xsl file) to list menus
 
Share this answer
 

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