Skip to content

Instantly share code, notes, and snippets.

@adam91holt
Created September 28, 2016 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam91holt/6ebc6baff990c503a8cf788363a1784c to your computer and use it in GitHub Desktop.
Save adam91holt/6ebc6baff990c503a8cf788363a1784c to your computer and use it in GitHub Desktop.
View
<asp:HiddenField ID="hfB2BWindscreen" runat="server" Value="!" ClientIDMode="Static" />
codebehind
Dim _currentUser As UserInfo = UserController.GetCurrentUserInfo()
For Each BrandRoleName In {"GB", "DULUX", "CP", "WATTYL", "PM", "M10", "ITM", "REPORT"}
If _currentUser.IsInRole(BrandRoleName) Then
If Not String.IsNullOrWhiteSpace(hfB2BWindscreen.Value) Then hfB2BWindscreen.Value &= ","
hfB2BWindscreen.Value &= BrandRoleName
End If
Next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment