如何判断Customer和Administor
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"];
}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。