如何使网页设计因登录用户而异 [英] how to make web page design varies based on logged user

查看:71
本文介绍了如何使网页设计因登录用户而异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想创建一个基于登录用户更改其设计(布局,面板,css ..)的网页,示例:某些菜单可能会出现,其他菜单可能会消失,或者还有一组标签,以及页面布局。在我的情况下,我想为学生和老师建立一个学术门户网站,所有这些都应该登录到系统,然后重定向到同一个页面(例如:main),但他们应该在同一页面中看到不同的设计登录用户。



我怎样才能完成这项工作?



提前感谢:)

Hi all,

I want to make a web page that changes its design (layouts, panels, css..) based on the logged in user, for example : some menus may appear , other may disappear , or a group of tabs also , and also the page layout. In my case , I want to build an academic portal for students and teachers , and all of them should log into the system , and then get redirected to the same page (eg: main) but they should see different design in the same page according to the logged in user.

how can I achieve this job ?

thanks in advance :)

推荐答案

请参阅我对该问题的评论。从这里开始: http://www.asp.net/get-started [ ^ ]。是的,我很认真。 :-)



-SA
Please see my comment to the question. And start here: http://www.asp.net/get-started[^]. Yes, I'm serious. :-)

—SA


最简单的方法是检索 的角色登录 用户,如老师学生。要存储用户的角色,您可以将新列添加到用户表或创建两个新表,如...

  • UserRole 表( UserId RoleId
  • 角色表( RoleId RoleName
The easiest way would be retrieving the Role of Logged In User like teacher or student. To store the Role of User, you could add a new Column to the User Table or create two new Tables like...
  • UserRole Table (UserId, RoleId)
  • Role Table (RoleId, RoleName)


这篇关于如何使网页设计因登录用户而异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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