显示用户类型的菜单列表 [英] display menu list on user type
本文介绍了显示用户类型的菜单列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有菜单列表,
我根据用户类型显示了这个列表。
如果它的管理员那么它应该显示usertype上的所有其他内容。
任何人都可以帮助我。帮助我。 >
ASP.NET使用C#
谢谢
解决方案
< blockquote>首先,您需要添加对应用程序中记录的用户类型的检查。
现在让我们假设UserType = 1表示管理员,如果是非管理员则休息。
现在默认情况下,将您要显示给管理员的菜单项的visibility / Display设置为false / none。现在登录时检查用户类型。
if(UserType == 1)
{
//通过将visibility / Display设置为true / block $ b来显示管理菜单类型$ b}
因此,您可以控制基于用户类型的应用程序的菜单。在您拥有菜单html的页面(通常是母版页)上进行此编码。
Hi guys,
I have menu list,
where i have display this list based on the usertype.
if its admin then it should display all else on usertype.
Can anyone plzzz, help me.
ASP.NET USING C#
thanks
解决方案
Firstly, you need to add check for user type logged in the application.
NOW let us assume UserType = 1 for Admin and rest if for non-admin.
Now by default set the visibility/Display to false/none for the menu item you wanted to show to the admin only. Now at login check the user type.
if(UserType == 1) { // Show the admin menu type by setting visibility/Display to true/block }
Thus you can control the menu for usertype based applications. Do this coding on the page(usually masterpage) where you have menu html.
这篇关于显示用户类型的菜单列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文