处理标签并进行身份验证 [英] handling tabs after and befor authentification

查看:78
本文介绍了处理标签并进行身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的菜单:







this is my menu:



<% if (Request.IsAuthenticated)
{ %>
<%: Html.ActionLink("tag1", "tag1", "Home")%>
<% } %>
<%: Html.ActionLink("tag2", "tag2", "Home")%>
<% } %>

else
{
<%: Html.ActionLink("Home", "Index", "Home") %>
<%: Html.ActionLink("Assurancequalité", "AQ", "Home") %>
<%: Html.ActionLink("Control qualité","CQ", "Home">
}





i想要测试与用户认证:

例如,如果第一个用户正在验证''tag1''出现

如果第二个用户正在验证''tag2''出现

其他

其他标签出现



i want get a test with the users authentifications:
for example if the first user is authentificate the ''tag1'' appear
if the second user is authentificate the ''tag2'' appear
else
the otherv tags appear

推荐答案

为什么一遍又一遍地问这个?



HttpContext.Current.User



为您提供当前用户。用户具有IsInRole方法或类似方法。



请不要再问这个问题,不要淹没网站。只需询问,并在必要时继续编辑您的问题。或者更好的是,第一次问清楚。
Why are you asking this over and over again ?

HttpContext.Current.User

gets you the current user. User has an IsInRole method, or similar.

Please don''t ask this again, don''t flood the site. Just ask, and keep editing your question if need be. Or better yet, ask clearly the first time.


这篇关于处理标签并进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆