[Last Call] Learn how to a build a cloud-first strategyRegister Now


How to make a collapsible menu webcontrol?

Posted on 2008-11-14
Medium Priority
Last Modified: 2013-12-17
I havent made a webcontrol before so a bit confused on how to do it. I want to make a collapsible menu webcontol for my asp 2.0 webpage. Also after making the webcontrol would it be possiable to Hide and show certain sections of it on pageload based on a if statement in my C# code?

Like: If (roles = cook)
                  hide management reports
                  show todays events and menu choices
Question by:Figle
  • 2
LVL 20

Expert Comment

ID: 22966106
Hi Figle,

It is definitely possible to show/hide controls, using:

Control.Visible = True | False

Would that work? What type of control are you using for the individual sections?


Author Comment

ID: 22967983
I dont have the control yet, not quite sure as to how to make it. But it would be a collapsible menu with 1 main section and various subsections that would expand down from it. So with this i could make some of the subsections that drop down be hidden with others show?  Could you give me a example on how this would be done or direct me to some helpfull references please?
LVL 20

Accepted Solution

Juan_Barrera earned 2000 total points
ID: 22968831

I think that the best way would be to use the default asp.net Menu control and, if you need something slightly different, just create a control inheriting from it:

ASP.NET Menu Control Overview:

Developing Custom ASP.NET Server Controls:          

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses
Course of the Month17 days, 20 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question