在登录时检索特定记录 [英] retrieving particular records on login

查看:61
本文介绍了在登录时检索特定记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我有两种类型的用户1.员工2.管理员
根据登录到不同页面的用户而定...我有一个称为雇员主数据库的员工数据库,以及一个任务主数据库,该数据库保存分配给所有雇员的任务,并且该任务主数据库还保存了来自雇员主数据库的employeeid作为外键.现在雇员登录时.该页面应显示仅分配给已登录的雇员的任务.我该如何处理?

可以使用内置工具asp.net完成此操作,还是需要编写查询???

In my project i have two types of users 1.employees 2.admin
depending on who logs in they are taken to different pages...i have a database for employees called employee master and a taskmaster database which holds tasks assigned to all employees and this taskmaster also holds the employeeid from the employeemaster as the foreign key...now when an employee logs in..the page should display the tasks assigned to only that employee who has logged in....how do i go about it?

can this be done using asp.net built in tools or will be required to write queries??

推荐答案

就像您听说过ASP.NET 2.0中的角色管理器一样并感到困惑.

阅读此内容:
MSDN:在ASP.NET 2.0中使用角色管理器 [ ASP .NET 2.0成员资格,角色,表单身份验证和安全资源 [
Looks like you had heard of Role Manager in ASP.NET 2.0 and getting confused.

Read this:
MSDN: Use Role Manager in ASP.NET 2.0[^]

You can use ASP.NET built in functionality via configuration but you would need to authenticate the user after login and get back certain necessary profile details.

Also go through this:
ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources [^]


gopal07写道:
gopal07 wrote:

将需要写查询?



当然可以. ASP.NET身份验证对您的数据库一无所知,也不应该知道.在处理完身份验证后,由您自行决定适当地检索和填充表单



Of course you will. ASP.NET authentication knows nothing about your database, nor should it. It''s up to you to retrieve and populate the forms appropriately after it has handled the authentication


这篇关于在登录时检索特定记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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