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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

709 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now