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"];
}
本文出自 “Marktang” 博客,转载请与作者联系!