Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 05, 2013 09:02 PM by Xcraft
Member
66 Points
110 Posts
Jan 30, 2013 03:52 PM|LINK
Hi all,
I got this menu, but it renders in Tables, how can i change it to get it working in DIVs?
<asp:Menu ID="Menu3" runat="server" DataSourceID="SiteMapDataSource" DynamicHorizontalOffset="1" StaticEnableDefaultPopOutImage="False" CssClass="menu-left-rows"> <DynamicHoverStyle cssclass="menudynamichover" /> <DynamicMenuStyle cssclass="menudynamic" /> <DynamicMenuItemStyle cssclass="menudynamicitem" /> <StaticHoverStyle CssClass="menustatichover" /> <StaticMenuItemStyle CssClass="menustatic" /> </asp:Menu> <asp:SiteMapDataSource ID="SiteMapDataSource" runat="server" ShowStartingNode="False" SiteMapProvider="mysource" />
no idea where to look.
thanks a lot,
mike
All-Star
42888 Points
7020 Posts
MVP
Feb 04, 2013 06:14 AM|LINK
Hello,
You cannot render asp:Menu as divs. For that you have to use a custom menu. However, if you would like, you can render it as a List instead of Table. For that, you can set the RenderingMode to List as shown below
<asp:Menu ID="Menu3" runat="server" DataSourceID="SiteMapDataSource" DynamicHorizontalOffset="1" StaticEnableDefaultPopOutImage="False" CssClass="menu-left-rows" RenderingMode="List">
Note that RenderingMode attribute will only work in .net framework 4.0 and higher versions.
Please 'Mark as Answer' if this post helps you.
126896 Points
17922 Posts
Feb 04, 2013 07:43 AM|LINK
Try to look at CSS Menu Control Adapter
Feb 05, 2013 09:02 PM|LINK
Hi Vinz,
That did the trick!
Thanks a lot
Xcraft
Member
66 Points
110 Posts
Menu control converting to DIV
Jan 30, 2013 03:52 PM|LINK
Hi all,
I got this menu, but it renders in Tables, how can i change it to get it working in DIVs?
<asp:Menu ID="Menu3" runat="server" DataSourceID="SiteMapDataSource" DynamicHorizontalOffset="1" StaticEnableDefaultPopOutImage="False" CssClass="menu-left-rows">
<DynamicHoverStyle cssclass="menudynamichover" />
<DynamicMenuStyle cssclass="menudynamic" />
<DynamicMenuItemStyle cssclass="menudynamicitem" />
<StaticHoverStyle CssClass="menustatichover" />
<StaticMenuItemStyle CssClass="menustatic" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource" runat="server" ShowStartingNode="False" SiteMapProvider="mysource" />
no idea where to look.
thanks a lot,
mike
Ruchira
All-Star
42888 Points
7020 Posts
MVP
Re: Menu control converting to DIV
Feb 04, 2013 06:14 AM|LINK
Hello,
You cannot render asp:Menu as divs. For that you have to use a custom menu. However, if you would like, you can render it as a List instead of Table. For that, you can set the RenderingMode to List as shown below
Note that RenderingMode attribute will only work in .net framework 4.0 and higher versions.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.vinz
All-Star
126896 Points
17922 Posts
MVP
Re: Menu control converting to DIV
Feb 04, 2013 07:43 AM|LINK
Try to look at CSS Menu Control Adapter
MessageBox Controls for WebForms | Blog | Twitter | Linkedin
Xcraft
Member
66 Points
110 Posts
Re: Menu control converting to DIV
Feb 05, 2013 09:02 PM|LINK
Hi Vinz,
That did the trick!
Thanks a lot