Click here to Skip to main content
12,448,343 members (53,610 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET XML
I have to create menu in asp.net their styling should be like
Parent menu1    Parent menu2   Parent menu3
    |                 |             |
    |                 |             |
Chlid Menu1       Chlid Menu2    Child Menu3
     |                |
     |                |
Grand Child       Grand Child
Grand Child
These menu items are binded with XML to menu control of asp.net
Posted 14-Jun-12 0:32am
Updated 14-Jun-12 20:34pm
Nikfazan14.7K
v4
Comments
Member 8783155 14-Jun-12 6:33am
   
plzz answer ??
Sandeep Mewara 14-Jun-12 11:02am
   
Did you try anything so far?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hi you can do one thing. Create a user control and put the below code as:
<asp:Menu ID="mnuMainMenu" runat="server" Orientation="Horizontal" MaximumDynamicDisplayLevels="1"
    StaticMenuItemStyle-Width="100%" DynamicEnableDefaultPopOutImage="True" StaticPopOutImageUrl="~/Images/divider.gif"
    CssClass="MyMenuStatic" PathSeparator="," DynamicVerticalOffset="2" DynamicMenuStyle-BorderWidth="1"
    StaticBottomSeparatorImageUrl="Images/seprator-vertical.GIF">
    <StaticHoverStyle CssClass="MyMenuStatic" />
    <StaticMenuItemStyle CssClass="MyMenuStatic" />
    <DynamicMenuItemStyle CssClass="MyMenuDynamic" />
    <DynamicHoverStyle CssClass="MyMenuDynamicHover" />
    <Items>
        <asp:MenuItem Text="Parent menu1" Selectable="true" NavigateUrl="javascript:DoNothing()">
            <asp:MenuItem Text="Chlid Menu1" NavigateUrl="javascript:ChlidMenu1Requirements()">
                <asp:MenuItem Text="Grand Child1" SeparatorImageUrl="~/Images/seprator.gif" NavigateUrl="javascript:GrandChild1()">
                </asp:MenuItem>
                <asp:MenuItem Text="Grand Child2" SeparatorImageUrl="~/Images/seprator.gif" NavigateUrl="javascript:GrandChild2()">
                </asp:MenuItem>
            </asp:MenuItem>
        </asp:MenuItem>
        <asp:MenuItem Text="Parent menu2" Selectable="true" NavigateUrl="javascript:DoNothing()">
            <asp:MenuItem Text="Chlid Menu2" NavigateUrl="javascript:ChlidMenu2Requirements()">
                <asp:MenuItem Text="Grand Child3" SeparatorImageUrl="~/Images/seprator.gif" NavigateUrl="javascript:GrandChild3()">
                </asp:MenuItem>
            </asp:MenuItem>
        </asp:MenuItem>
        <asp:MenuItem Text="Parent menu3" Selectable="true" NavigateUrl="javascript:DoNothing()">
            <asp:MenuItem Text="Chlid Menu4" NavigateUrl="javascript:ChlidMenu2Requirements()">
            </asp:MenuItem>
        </asp:MenuItem>
    </Items>
</asp:Menu>
Now few more steps you need to follow
a) find 2 small images 1) separator and 2) small divider
b) menu styling has to be done using css
  Permalink  
v2
Comments
Member 8783155 15-Jun-12 0:25am
   
please tell me what code should be embedded in javscript functions ChlidMenu2Requirements(,) GrandChild2()
Member 8783155 15-Jun-12 1:14am
   
Grand Child
Grand Child

these should appear on mouseover event upon child menu
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

in the javascript you shoud write the code of ur project specific requirement
supose ur clild menu one is for opening RajesthanRoyalpage, so write the code accordingly in that again if grand child 2 is for Account detail page of rajesthan royal team, then in java script u can write the code to open that perticular code...

please accept ans if you r satisfied with resulution
Amit
  Permalink  
Comments
Member 8783155 18-Jun-12 1:28am
   
Have you run this code , it is not working GrandChild menu is not opening

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
Web02 | 2.8.160811.3 | Last Updated 15 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