Frage

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.

War es hilfreich?

Lösung

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;
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top