質問

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.

役に立ちましたか?

解決

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;
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top