Question

I have a users table in my sql server 2008 which has
username, password, email,first name, last name and user group.

I want to display my website controls specific to that user groups once the user logs in.

Could you please help in this issue.

Was it helpful?

Solution

You can assign user's user group is a session variable at the time of log in. Now you can set (may be on page_load) your pages's controls visibility upon that value.

Something like this,

If(Session["UserGroup"] == "1")
{
    ControlID.Visible = true;
}
else
{
    ControlID.Visible = false;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top