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 8994615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:28:20+00:00 2026-06-15T23:28:20+00:00

I am using asp:menu. My aspx code is: <body> <form id=form1 runat=server> <div> <asp:Menu

  • 0

I am using asp:menu. My aspx code is:

<body>
    <form id="form1" runat="server">
    <div>
        <asp:Menu ID="Menu_Library" runat="server">
        </asp:Menu>

    </div>
    </form>
</body>

I am generating the sub menu items (i.e) the childitems dynamically.. If i click the sub menu items it redirects me to a page which i specify like this in my code behind,

MenuItem childItem = new MenuItem();
childItem.NavigateUrl = "OtherPage.aspx";

But what i need is when i click on sub menu items, it should display some items in same page..

How to achieve this? Please help me.. It can be either in javascript or code behind.. I don’t want it to navigate it to another page instead perform the action in same page..

  • 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-06-15T23:28:21+00:00Added an answer on June 15, 2026 at 11:28 pm

    Instead of using the Page link you can use javascript for that and any div you can show or hide in it.

    Your Code:

    MenuItem childItem = new MenuItem();
    childItem.NavigateUrl = "OtherPage.aspx";
    

    Change with:

    MenuItem childItem = new MenuItem();
    childItem.NavigateUrl = "javascript: return GoToSomeLink('"+ count +"');"; //You can pass parameters also
    

    Javascript function:

    <script type="text/javascript">
    function GoToSomeLink(obj) //if parameters are used use them here also.
    {
        var count=parseInt(obj); //use this count varible anywhere in the function
        $(#menuDiv).show(); /any div show or hide
        return false;
    
    }
     </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using ASP.Net MVC on my Site.Master I have: <head runat=server> <title><asp:ContentPlaceHolder ID=TitleContent runat=server />
I am using menu in my aspx pages with using jquery.click. in my asp.net
i am trying to load a aspx in a classic asp using this code:
I'm using an asp.net Menu (asp:Menu - the built-in one) and I want to
I'm using a standard asp.net menu in an asp.net 4.0 web application. To clarify,
I have a asp.net sitemap with single level dropdown menu. I am using following
I have a master page that contains an ASP.NET server side Menu control (System.Web.UI.WebControls.Menu)
I need to create dynamic menu using and submenu using dynamically using c# code
I am using ASP:Menu and I would like to have the menu shown as
Am I able to hide certain menu items in an asp:Menu control based on

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.