开发者

N2cms display part of the page only for Admins

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜