Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6595199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:54:33+00:00 2026-05-25T17:54:33+00:00

I have an asp:menu and I have for eg 3 menuItem: First Second Third

  • 0

I have an asp:menu and I have for eg 3 menuItem: First Second Third and the second item have 2 submenuItems i want to show the 2 submenuitems only when I click on the Second menuitem not when I hover the mouse over. I’ll put the code of menu here

<asp:Menu ID="Menu_WebSite" runat="server"
DynamicHorizontalOffset="10" TabIndex="1" 
Font-Names="Verdana" Font-Size="12px" 
StaticSubMenuIndent="10px" Orientation="Horizontal"
StaticEnableDefaultPopOutImage="false" BackColor="#f0f0f0">                                                
    <StaticSelectedStyle ForeColor="Black" />                                                                                                
    <DynamicHoverStyle  BackColor="#f0f0f0"  ForeColor="Black" />
    <DynamicMenuItemStyle BackColor="#f0f0f0" HorizontalPadding="25px" VerticalPadding="3px" />
    <DynamicMenuStyle BackColor="#f0f0f0"  ForeColor="Black" />                                                
    <DynamicSelectedStyle  BackColor="#f0f0f0" Forecolor="Black" />                                                                                                                                                                                                 
    <StaticHoverStyle   BackColor="#f0f0f0" ForeColor="Black" />
    <StaticMenuItemStyle BackColor="#f0f0f0"  HorizontalPadding="10px" VerticalPadding="3px" />                                                                                                
    <StaticItemTemplate>                                                      
        <%#Eval("text")%>
    </StaticItemTemplate>
</asp:Menu>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:54:34+00:00Added an answer on May 25, 2026 at 5:54 pm

    my answer is purely theoretical, so you may wish to hold out for someone willing to do leg work for you.

    The hover styles can be controlled with CSS. It may be possible to write CSS to ensure the submenu items are hidden even when the user hovers over the main menu items, then change the CSS class dynamically with JavaScript when the user clicks the menu item.

    Bearing in mind that clicking the menu item may cause a postback, you may need to show/hide the submenus in server code…

    Also, you’ll need to consider that you may need to hide the sub menus manually using the onClick event again.

    Finally, you may wish to consider not using the ASP Menu for this, because it’s designed to be used as a hover menu. You might be better off writing your own implementation, depending on whether you really need the ASP Menu functionality. There are many examples of good menus online, so you might find one that does what you’re looking for with more ease. The ASP.NET TreeView control may provide you with a much closer starting point.

    A quick Google throws up the following blog that may be what you’re looking for:

    http://msd-bml.blogspot.com/2008/09/aspnet-menu-click-instead-of-hover.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp:Menu and it contains a top level menu item that points
I have a ASP.Net Menu Control with three levels and flyouts enabled. I want
in my asp.net website I have menu control and there are those items: <asp:menuitem
I have a menu bar with different items, with sub items, //ASCX FILE <asp:MenuItem
I have a list of asp.net menu items: <asp:Menu ID=Menu1 runat=server OnLoad=Menu1_Load> <Items> <asp:MenuItem
I have this asp:menu with a few items and want to be able to
I have an ASP.Net Navigation Menu control with 1 item that I need to
I have a asp:menu object which I set up to use a SiteMapDataSource but
The background is I have a custom control that is a asp:Menu that is
I have an ASP.NET webforms application with a Menu control. How does one hide

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.