Link to home
Create AccountLog in
Avatar of Dovberman
DovbermanFlag 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,
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Is this WinForms or web site?

Bob
Avatar of Dovberman

ASKER

WEBSite. ASPX page.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
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,