Avatar of Dovberman
Dovberman
Flag for United States of America asked on

How to restrict menu items to a logged on user.

I would like to set the enabled property of menu items to specific logged on users.

I know that each menu item can be referenced by a collection member.

me.Menu1.Items(1)

My question is what event to use to enable the menu item based on the logged in user.

Any references will be helpful.

thanks,
.NET Programming

Avatar of undefined
Last Comment
Dovberman

8/22/2022 - Mon
Bob Learned

Is this WinForms or web site?

Bob
Dovberman

ASKER
WEBSite. ASPX page.
ASKER CERTIFIED SOLUTION
Bob Learned

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Dovberman

ASKER
I found the answer in an aspx.vb file from a year ago.

Yes the page load event works.

If logged on user.... Then
       Menu1.Items(1).Enabled=True
Else
        Menu1.Items(1).Enabled=False
End If


Thanks,
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy