Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

NOJIRA

Fix bug in role display when user has multiple roles.
  • Loading branch information...
commit fe9dcc27f20fb0ffe835800125bc70a9a5bd4b91 1 parent b87b368
@serac serac authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 ExampleWebSite/Restricted/UsersRoleOnly/Default.aspx.cs
View
10 ExampleWebSite/Restricted/UsersRoleOnly/Default.aspx.cs
@@ -34,11 +34,15 @@ protected void Page_Load(object sender, EventArgs e)
RoleList.DataBind();
RoleList.Enabled = false;
- foreach (string role in roles)
+ foreach (ListItem item in RoleList.Items)
{
- foreach (ListItem item in RoleList.Items)
+ foreach (string role in roles)
{
- item.Selected = (item.Value == role);
+ if (item.Value == role)
+ {
+ item.Selected = true;
+ break;
+ }
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.