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

x
?
Solved

How to make a collapsible menu webcontrol?

Posted on 2008-11-14
3
Medium Priority
?
556 Views
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
              }
0
Comment
Question by:Figle
  • 2
3 Comments
 
LVL 20

Expert Comment

by:Juan_Barrera
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?


0
 

Author Comment

by:Figle
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?
0
 
LVL 20

Accepted Solution

by:
Juan_Barrera earned 2000 total points
ID: 22968831
Figle,

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:
http://msdn.microsoft.com/en-us/library/ecs0x9w5(VS.80).aspx

Developing Custom ASP.NET Server Controls:          
http://msdn.microsoft.com/en-us/library/zt27tfhy(VS.80).aspx
0

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