Solved

I need to be able to have a user login and be redirected to different index pages based on their ID's

Posted on 2008-10-13
2
146 Views
Last Modified: 2013-11-07
I have a login.aspx page developed. I need to figure out how to tie this to an Access 2003 database that stores the user id and passwords. If the id and pass are correct then redirect the user to a file location and index.aspx page. I am not sure if I need to have the folder and page file in the database or in the code behind. Any ideas and sample code you can provide me would be greatly appreciated. Here is the file structure I am using. In the () is the user id that I will need in the database to access this directory. Thanks for your time. And I don't want to use the membership tables if at all possible.

client folder
login.aspx
----- c1 folder (id_00001)
----- index.aspx

----- c2 folder (id_00002)
----- index.aspx
0
Comment
Question by:woodje
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
pwrBall earned 500 total points
ID: 22707037
It sounds like you need to create user roles for your site.  

You should have a table that contains user roles, and assign each user a specific role like 'admin' and 'user'

UserRole table:
userRoleID         userRoleName
1                        admin
2                        user
3                        poweruser


So you'd have to create a user role table in access and a new column in the user table for the role ID.

Based off of the role ID, that you should check during login, you would send the user to a specific hard coded directory.

This helps to:
http://www.codeproject.com/KB/aspnet/custom_authentication.aspx

The above link does not include accessing a database though.

I created a Login class which I call from the login page code behind to connect to the database with the passed in credentials that the user types in.  Only difference is that I used SQL Server 2000.
Based off of the users' role, I passed them to a different folder that they had access to.


0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 22711030
Explore the ASP.NET Routing and Dynamic Data. I thinks that has the answer to your question.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help for captcha 2 42
Send parameters via datatable ajax call 4 43
Help with Report Viewer in VS2013 6 33
How do I "share" on social sites? 2 38
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question