Hi,
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.
Sunny
Find Role of logged in user and redirect based on role membe
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

pradeep kumar72 reputationPosted Dec 9, 2012, 9:32 AM EST
You can do that in login page itself....,by simple if else condition
check this out...,
First thing you have to check is whether you are passing loginid nor role or name....,
then
if(object.role=="Admin1")
{
response.redirect("home.aspx",false);
}
else
{
response.redirect("default.aspx",false);
}