• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 560
  • Last Modified:

How to make a collapsible menu webcontrol?

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
Figle
Asked:
Figle
  • 2
1 Solution
 
Juan_BarreraCommented:
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
 
FigleAuthor Commented:
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
 
Juan_BarreraCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now