December 6th, 2012, 02:07 PM
Find Role of logged in user and redirect to specific page based on roles
I am pretty new in ASP.NET c#. But i am getting a good hold of it. There are all the time new things a new learner comes up with though and spends hours together finding out a solution.
Here is my issue.
I have a ASP.NET membership setup. I have a asp login system on the website. I have created 2 roles Administrator and Users.
I have 1 user in Administrator and 1 in Users currently for my testing purpose.
Now when the user logs in to the system i want to check there roles and if the role of teh logged in user is Administrator then send them to a specific folder called admin or else send them to the default.aspx in root directory.
How do we find the Role of logged in user and redirect accordingly.
Thanks in advance.