验证后菜单选项卡的外观 [英] appearance of the menu tabs after authentication

查看:116
本文介绍了验证后菜单选项卡的外观的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不希望在认证后菜单上有任何标签吗?

我必须做什么?

i想用登录名和密码进行测试

我有两个用户,突然每个人都有这些特定的标签

所以我想测试user1是否认证......

和第二个相同



这是表达



<%if(Request.IsAuthentificated)

{%>

<%:Html.ActionLink(test,test,Home)%> 。

解决方案

我不确定MVC4.0语法,但您可以测试角色以及查看用户是否已登录。 ..它的伪代码将是... ...



如果request.auntheticated 
如果userrole是admin
show admin menu
else
show member menu
end if if
else
show default public menu
end if


I do not want any tabs on the menu apparessent that after authentication?
WHAT should MUST I do please??
i want to test it whith the login and password
I have two users, suddenly everyone has these specific tab
so I want to test if user1 is authentificate ......
and same for the second

THIS IS THE expression

<% if(Request.IsAuthentificated)
{%>
<%: Html.ActionLink ("test", "test", "Home")%> .

解决方案

I''m not sure of the MVC4.0 syntax but You could test for the roles as well as to see if the user is logged in....the psuedo code for it would be something along the lines of...

If request.auntheticated
  If userrole is admin
    show admin menu
  else
    show member menu
  end if
else
  show default public menu
end if


这篇关于验证后菜单选项卡的外观的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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