How to force Asp.net 3.5 Menu Control to Rendered as UL List Item
Solution 1
The CSS friendly control adapters for ASP.NET 2.0 are doing precisely that. I've used them a couple of times and they always did the job. They can be activated/deactivated for each control type. For the grid control for example they render the tag, which as we all know is essential for easy styling.
Solution 2
Simply Change Rendering Mode :)
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" CssClass="menu"
RenderingMode="List" >
Nasser Hadjloo
Founder @Sunkime, Former UX Manager @SimplyDesk, Speaker @TEDxTehran, Speaker @OWP1392, Sepaker @OWP1391, WindowsPhone nerd. UI / UX Designer who is into Localization, Globalization, Unicode and Web Standards ======================================= Website: http://wwww.hadjloo.ir Blog: http://Hadjloo.wordpress.com Twitter: @Hadjloo http://twitter.com/hadjloo
Updated on June 22, 2022Comments
-
Nasser Hadjloo almost 2 years
As you all know Asp.net 3.5 and past generations Rendered as Table ( TR - TD ) form and this makes it heavy to load and blah blah blah. Microsoft change the rendering methods of this control from table to UL LI in Asp.net 4.0
As I am using Asp.net 3.5 , Is there any solution to force this control rendered as a UL LI ?
-
Hammad Khan over 7 yearsThis makes big impact in menu layout! Work for .NET 4 and above