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
              }
FigleAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.