• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 759
  • Last Modified:

DynamicMenuItemStyle

In ASP.net 3.5, is there a HorizontalAlignment Property in the DynamicMenuItemStyle or is there any way for the text in the Dynamic Menu to be left aligned instead of centered?

thanks
0
deepPowdah
Asked:
deepPowdah
1 Solution
 
joeyluCommented:
I put a <div> inside of this DynamicItemTemplate, and add any style you like in the div should give you all your needs.

    <asp:Menu ID="Menu1" runat="server" DataSourceID="XmlDataSource1" Width="200px" DynamicHoverStyle-Height="50px">
        <DynamicHoverStyle Height="100px"></DynamicHoverStyle>
        <DynamicItemTemplate>
           <div Align="Left">
            <%# Eval("Text") %>
           </div>
        </DynamicItemTemplate>
        <DynamicMenuItemStyle BackColor="Fuchsia" />
        <DynamicMenuItemStyle Width="200px" />
    </asp:Menu>
    <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/menu.xml">
    </asp:XmlDataSource>

Open in new window

0
 
deepPowdahAuthor Commented:
That didn't work for me. I had to create a class and  use the following code.

 
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now