Click to See Complete Forum and Search --> : Need help on custom login in asp.net 2.0 FAST!!


fredsapien
11-09-2006, 06:46 AM
Here's my problem..

i am a noobie in asp.net.i am using visual web developer 2005 (in VB). my first task is to create a custom login.

i have a database called CTEFDatabase.mdf. Note the .mdf file i'm using. i've created a login table containing numberID and password. this table contains,u guessed it, the numberID and passwords for registered users.

i dont know how to create roles (e.g. students and administrators) to diffrentiate between these two.

my question is..

1. How do i access the login table i've created for authentication purposes?
2. How to i allow each role to access different views? (student redirected to student home page if login is successful and admin to admin home page if login is successful.)

i've visited many web sites, but all of them use sql statements, not the .mdf file that i wanted to use for my login. help me give a step by step as to how i can solve this problem. thanks.

*note- i have no clue about coding or sql statements because i'm a noobie...

please include all the web.configs and watever eles is needed to get me going... if not, please do give a web site that can help and uses the .mdf file as the main database, not sql statement...thanks again...

from,
a helpless noobie

sirpelidor
11-09-2006, 10:44 AM
Here's my problem..

i am a noobie in asp.net

help me give a step by step as to how i can solve this problem. thanks.

*note- i have no clue about coding or sql statements because i'm a noobie...

please include all the web.configs and watever eles is needed to get me going... if not, please do give a web site that can help



instead of re-create the wheel, you should consider using Membership provider and Role provider built-in by .net 2.0. In most cases, U won't even need to write a piece of sql statment.

detail goes here (http://aspnet.4guysfromrolla.com/articles/120705-1.aspx)

boovster
11-12-2006, 07:04 PM
http://asp.net/learn/videos/default.aspx?tabid=63
The link above has a three part video tutorial about logins and rolemanagement

also check out
www.learnvisualstudio.net
they have great video tutorials for a low fee...