Avatar of sami ullah
sami ullah
 asked on

show less info in menu bar for user

check user name in session if admin is login more info in menu bar and if user is login less info in menu bar show to user
ASP.NET

Avatar of undefined
Last Comment
Vishal Tankariya

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Vishal Tankariya

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.
Jesus Rodriguez

var menu = Page.Master.FindControl("Menu1") as Menu;
if(Session["UserName"] != "Admin")
{
 Menu1.Items.Remove(Menu1.FindItem("INSPECTION"));
 Menu1.Items.Remove(Menu1.FindItem("WORK"));
}
Vishal Tankariya

From session value to show hide panel to solve the issue.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck