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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:25:16+00:00 2026-06-11T22:25:16+00:00

I have a Hierarchical Table for Categories in this form NodeID ParentID NodeName Following

  • 0

I have a Hierarchical Table for Categories in this form NodeID ParentID NodeName

Following is the code i am using generate ASP.NET MENU ITEMS and bind it to MENU CONTROL

Private Sub displayMenu()
        Using con As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("HagglerEntLibConStr").ConnectionString)
            Using sql As New SqlCommand("Select NodeID,ParentID,NodeName FROM Nodes", con)
                con.Open()
                Dim r As SqlDataReader = sql.ExecuteReader 'stored procedure that returns the above SqlDataReader
                Dim tempMaster As New MenuItem()
                Dim bagMaster(700) As MenuItem
                Dim j As Integer = 0
                Do While r.Read()
                    tempMaster.Value = r("NodeID").ToString()
                    tempMaster.ToolTip = r("ParentID").ToString()
                    tempMaster.Text = r("NodeName").ToString()
                    tempMaster.NavigateUrl = ""
                    bagMaster(j) = tempMaster
                    j += 1
                    tempMaster = New MenuItem()
                Loop
                r.Close()
                Menu1.Items.Clear()
                For i As Integer = 0 To j - 1
                    If i = 0 Then
                        Menu1.Items.Add(bagMaster(i))
                    Else
                        For x As Integer = 0 To j - 1
                            If bagMaster(i).ToolTip = bagMaster(x).Value Then
                                Dim c As MenuItem = bagMaster(x)
                                'you can change the tool tip here if you want
                                c.ChildItems.Add(bagMaster(i))
                            End If
                        Next x
                    End If
                Next i
                'Menu1.Items.RemoveAt(0)

            End Using

        End Using

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        displayMenu()
    End Sub 

Everything works fine …but the main disadvantage with this approach is that the Menu CONTROL creates HTML TABLES…i have around 1000 rows in the table..this creates a multi level menu …which adds a lot of HTML Tables in the page and increases the page load time drastically…how do i tackle this issue?? This is the way the menu populates.

enter image description here

  • 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-11T22:25:17+00:00Added an answer on June 11, 2026 at 10:25 pm

    Have you tried with the RenderingMode property?

    Values:

    • Default. (This is the default value). The rendering mode depends on the RenderingCompatibility control property, if this setting is set to 3.5, the default rendering is a table, if this value is 4.0, the default rendering mode is a list ul. You can change this setting globally in the web.config file:

      <system.web>
          <pages controlRenderingCompatibilityVersion="4.0"/>
      </system.web>
      
    • Table. Renders as a table

    • List. Renders as a list

    Update 1

    Since you are using the .Net Framework 3.5, probably the best way to accomplish this is to use Control Adapters

    Basically the adapters work on a specific control, and in the adapter you can update the rendering of the target control, in this case the Menu control

    I have not created a control adapter, so I cannot give you further information other than pointing you in the right direction, googling I found this article which seems promising:

    http://msdn.microsoft.com/en-us/magazine/cc163543.aspx

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

Sidebar

Related Questions

I have a Table for categories , which stores Hierarchical Data in the following
I have a simple SQL table which defines a set of hierarchical categories and
I have the following hierarchical table: Table Category: CategoryId, ParentCategoryId, CategoryName 1, null, SomeRoot
I have a hierarchical (tree structure) SQL Server table TEmployee with following columns Id
i have a table with hierarchical structure. like this: (source: aspalliance.com ) and table
I have a MySQL database holding hierarchical data using the Closure Table method. A
I have the following tables: Categories ================================= CategoryID | ParentID | Text --------------------------------- 1
I have two table categories ( hierarchical structure ) and attachment that have relations
I have a hierarchical set-up going on a table using the whole START WITH
I have hierarchical data (right) in table in following manner which creates Hierarchy as

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.