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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:13:38+00:00 2026-06-11T10:13:38+00:00

I am trying to bhuild a drill down menu for my website, where user

  • 0

I am trying to bhuild a drill down menu for my website, where user will click on a category and it will show the subcategories of that clicked category, there could be n-levels.
I am able to write sql query which returns the output exactaly as I want, but the problem is…I dont want to show the whole menu to end user, I would like to open/expand only clicked category.

    my Query output is:

1 IPTV
2      Jadoo Tv
3      Shava Tv
4      Jalva Tv
5 Programming
6      Microsoft
7           Asp.Net
8      PHP

so by default IPTV & Programming Should be displayed, since they are parent, and when I click on IPTV it should open the children of IPTV, like I said there could be n-levels.

I was thinking, I can load the output of query to webpage and then control the menu navigation with css/javascript.

do you guys have any ideas?

  • 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-11T10:13:39+00:00Added an answer on June 11, 2026 at 10:13 am

    ok, here is the complete code for markup (after I get the result from sql sp).

        Private Sub CreateLeftMenu()
    
        Dim dt As DataTable = DAL.ReturnMSSQLData("EXEc CategoryTree")
        Dim str As New StringBuilder
    
        Dim catname As String = ""
        Dim catid As Integer = 0
        Dim parent As Integer = 0
        Dim sort As String = ""
        Dim keys As Array
    
        Dim display As String = "none"
    
        For Each item As DataRow In dt.Rows
    
            catname = Replace(item("CatName"), " ", " ")
            catid = item("id")
            parent = item("parent")
            sort = item("sort")
    
            If parent = 0 Then
                str.Append("<div class='group_" & parent & "'><a href='/pages/index.aspx?cat=" & sort & "' id='group_" & catid & "'>" & catname & "</a></div>")
            Else
    
                If Len(Me.GroupID) > 0 Then
                    keys = Split(Me.GroupID, "_")
    
                    For Each item1 As String In keys
                        If CInt(item1) = parent Then
                            str.Append("<div class='group_" & parent & "' style='display:block'><a style='text-decoration:none' href='/pages/index.aspx?cat=" & sort & "' id='group_" & catid & "'>" & catname & "</a></div>")
                        Else
                            'str.Append("<div class='group_" & parent & "' style='display:none'><a style='text-decoration:none' href='/pages/index.aspx?cat=" & sort & "' id='group_" & catid & "'>" & catname & "</a></div>")
                        End If
                    Next
    
                End If
    
    
    
            End If
    
        Next
    
        LMenu.Text = str.ToString
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying build a regex that will replace any characters not of the format:
Trying to build a plugin effect that will some what look better than this
We're trying to build an application that will describe our price list. The price
Trying to build a user interface using PyQt4. Got a dialog window that pops
I have a std::vector< tr1::shared_ptr<mapObject> > that I'm trying build from data contained in
Trying to build a website where the background of the site is a video
am trying to build a point system which checks how much points a user
im trying to build a form+attachment that needs to be send to email. Im
Trying to build Wireshark from source as there is no Linux installer and I
Trying to build a dynamic gallery that is loaded via AJAX. I'm trying to

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.