You must Sign In to post a response.
  • Category: ASP.NET

    Mouse over

    what is the code for the mouse over event on menu in asp.net and how to get the drop down by mouse over on menu item
  • #565874
    try this jaav script


    <a href="anil.aspx" onMouseover="javascript:alert('hi')'; return true" > Anil</a>

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #565894
    To get the drop down by mouse over on menu item is automatically assign.. we can't change the script for menu.. use the below code for dropdown menu..

    ---------------
    <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal">
    <Items>
    <asp:MenuItem Text="menu1" Value="menu1">
    <asp:MenuItem Text="sub menu 1" Value="sub menu 1"></asp:MenuItem>
    <asp:MenuItem Text="sub menu 2" Value="sub menu 2"></asp:MenuItem>
    </asp:MenuItem>
    <asp:MenuItem Text="menu2" Value="menu2">
    <asp:MenuItem Text="sub menu 1" Value="sub menu 1"></asp:MenuItem>
    <asp:MenuItem Text="sub menu 2" Value="sub menu 2"></asp:MenuItem>
    </asp:MenuItem>
    </Items>
    </asp:Menu>

    ---------
    and also change the property to Orientation="vertical" for vertical menu

  • #566071
    Did You need WPF or General c# using java script

  • #566582
    Hi i have seen the coding through
    <asp:Menu ID="Menu2" runat="server" BackColor="#F7F6F3"
    DynamicHorizontalOffset="10" Font-Bold="True" Font-Names="Times New Roman"
    Font-Size="Medium" ForeColor="#FFCC66" Height="33px" Orientation="Horizontal"
    SkipLinkText="" StaticSubMenuIndent="10px" Width="953px" >
    <StaticHoverStyle BorderColor="Black" BackColor="DarkGray" BorderStyle="Solid"/>
    <StaticSelectedStyle BackColor="#5D7B9D" />
    <StaticMenuItemStyle BorderStyle="Dashed" HorizontalPadding="5px"
    VerticalPadding="2px" />
    <DynamicHoverStyle BackColor="#FF9966" Font-Names="Arial" Font-Size="Large"
    ForeColor="White" />
    <DynamicMenuStyle BackColor="#F7F6F3" Height="4px" HorizontalPadding="5px"
    VerticalPadding="5px" Width="4px" />
    <DynamicItemTemplate>
    <%# Eval("Text") %>
    </DynamicItemTemplate>
    <DynamicSelectedStyle BackColor="#5D7B9D" />
    <DynamicMenuItemStyle Font-Bold="True" Font-Names="Arial" Font-Overline="False"
    Font-Size="Medium" Font-Strikeout="False" ForeColor="#CCCCFF"
    HorizontalPadding="5px" VerticalPadding="5px" />
    <StaticHoverStyle BackColor="#7C6F57" ForeColor="White" />
    <Items>
    <asp:MenuItem NavigateUrl="~/Home.aspx" Text="Home" Value="Home"></asp:MenuItem>
    <asp:MenuItem NavigateUrl="~/About Us.aspx" Text="About Us" Value="About Us">
    </asp:MenuItem>
    <asp:MenuItem Text="Services" Value="Services">
    <asp:MenuItem Text="Ceeling" Value="Ceeling">
    <asp:MenuItem Text="A" Value="A"></asp:MenuItem>
    </asp:MenuItem>
    </asp:MenuItem>
    <asp:MenuItem Text="Galary" Value="Galary"></asp:MenuItem>
    <asp:MenuItem NavigateUrl="~/Application.aspx" Text="App" Value="App">
    </asp:MenuItem>
    <asp:MenuItem Text="Contact Us" Value="Contact Us"></asp:MenuItem>
    </Items>
    <StaticItemTemplate>
    <%# Eval("Text") %>
    </StaticItemTemplate>
    </asp:Menu>


    But i am getting the output.


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.