Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I had a form called staff login where a staff can login with username and password and check its login type i.e. admin or general staff from a dropdown list what should be a logic for sending both the person on two different aspx pages according to their type.
suppose if he selected admin then admin.aspx and if staff then staff.aspx
Posted

1 solution

Simplest way is to do like this:if you are matching the username and password from database then you can add a column called usertype and check this column value also at the time of login , if the usertype is admin then redirect to admin.aspx else to other page.

you can also use ASP.net Roles and membership[^] to implement this.

hope it helps :)
 
Share this answer
 
Comments
Ajinkyaaher1 6-Mar-12 13:45pm    
Thanks Uday for the help
Uday P.Singh 6-Mar-12 14:25pm    
you are welcome, you can always accept the answer if it helps!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900