Master Page Code :
1.先判断Login是否为空,然后判断Login是否为‘Cust’或者‘Admin’,Code: if(Session['Role']==null)
{
lblbtnLogOut=false;
lblMenu.Visible=false;
}
else
{
lblbtnLogOut=true;
lblMenu.Visible=true;
ShopoingMenuSource.SiteMapProvider=Session["Role"].ToString();//Connection with Master Page
lblHi.Text="Hi "+Session["UserId"];
}
转载于:https://blog.51cto.com/marktang/1297514