DROPDOWN MENU IN ASP.NET

John Smith

Total Post:103

Points:727
Posted by  John Smith
 6510  View(s)
Ratings:
Rate this:
I am working on dropdown menu in ASP.NET.
On mouse over I like to change back color of that particular Menu.
I really appreciate if you provide me line of code.

  1. Amit Singh

    Post:103

    Points:721
    Re: Dropdown Menu in ASP.NET

    we add the css on onmouseover="function colorChange(this)"
    <script>
    function colorChange(obj)
    {
    obj.style.backgroundColor="red";
    }
    </script>

      Modified On Oct-01-2010 03:01:58 AM
  1. Alex R

    Post:40

    Points:280
    Re: Dropdown Menu in ASP.NET

    Hello John,

    You can change back color of dropdown menu by setting it hover property back color.

    <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal">

    <DynamicHoverStyle BackColor="Yellow" />

    <Items>

    <asp:MenuItem Text="Item1" Value="Item1">

    <asp:MenuItem Text="New Item1" Value="New Item1"></asp:MenuItem>

    <asp:MenuItem Text="New Item2" Value="New Item2"></asp:MenuItem>

    <asp:MenuItem Text="New Item3" Value="New Item3"></asp:MenuItem>

    </asp:MenuItem>

    <asp:MenuItem Text="Item2" Value="Item2">

    <asp:MenuItem Text="New Item1" Value="New Item1"></asp:MenuItem>

    <asp:MenuItem Text="New Item2" Value="New Item2"></asp:MenuItem>

    </asp:MenuItem>

    </Items>

    </asp:Menu>

      Modified On Oct-01-2010 02:50:46 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!