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
144 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with opening combobox using VB.NET. 3 25
parsing JSON help 1 20
Vb.net threads keep increasing 2 34
How to use NFS (Network File System) in Asp.net mvc 5? 4 43
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

791 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