I need some assistance as to how can I assign the DataValueField Value using the code below.
Protected
Sub
Page_Load(sender
As
Object
, e
As
System.EventArgs)
Handles
Me
.Load
'Dim UserName As String = Request.QueryString("UserName")
Dim
UserName
As
String
=
"Test"
lbl_UserName.Text = UserName
If
Not
IsPostBack
Then
Dim
results
As
New
ArrayList()
Dim
context
As
New
PrincipalContext(ContextType.Domain,
"Fred_NT"
)
Dim
p
As
UserPrincipal = UserPrincipal.FindByIdentity(context, IdentityType.SamAccountName, UserName)
Dim
groups = p.GetAuthorizationGroups()
For
Each
group
In
groups
results.Add(group.Name)
Next
rlb_MemberGroups.DataValueField = ????????
rlb_MemberGroups.DataSource = results
rlb_MemberGroups.DataBind()
End
If
Label1.Visible =
False
End
Sub
Thanks as always.