开发者

N2cms display part of the page only for Admins

开发者 https://www.devze.com 2023-03-06 00:32 出处:网络
I need to show links or may be a form, for just the logged admins. for example to do something like this :

I need to show links or may be a form, for just the logged admins.

for example to do something like this :

<%if(IsAdmin()){%>
 <div> 
  <a href="" src="BrowseAll"> Show all orders </a>
 <div/>
<%}%&开发者_StackOverflow中文版gt;


You can use following check

if (HttpContext.Current.Request.IsAuthenticated && HttpContext.Current.User.IsInRole("Administrators"))
0

精彩评论

暂无评论...
验证码 换一张
取 消