Private Function GetGroups(ByVal _path As String, ByVal _
username As String, ByVal password As String) As String
Dim GroupString As String
Dim myDE As New System.DirectoryServices.DirectoryEntry(_path, _
Dim mySearcher As New DirectorySearcher(myDE)
mySearcher.Filter = "sAMAccountName=" & username
Dim propertyCount As Integer
Dim myresult As SearchResult = mySearcher.FindOne()
propertyCount = myresult.Properties("memberOf").Count
Dim dn As String
Dim equalsIndex, commaIndex As String
For i As Integer = 0 To propertyCount - 1
dn = myresult.Properties("memberOf")(i)
equalsIndex = dn.IndexOf("=", 1)
commaIndex = dn.IndexOf(",", 1)
If equalsIndex = -1 Then
If you've had to pivot your table to show data in a column instead of a row, there's no way the control will let you update a column instead of a row. Your best bet is to use a repeater, start with your normalized data, and write the edit/update functionality yourself.
AFIK, It will try to connect with your server port not local system.
you can build a windows components and install it in client then try to retreive information for that client. Just an idea. you can try it.
The attribute name roles suggests that the value can contain more than one role. I haven't checked the documentation for this attribute, but I know that the users attribute takes a comma separated list of users, have you tried a comma separated list of roles?
Despite everything, the person most likely to be fooling you next is yourself.
I have a page that has a number of items on it (ImageButtons, to be exact). When an image button is clicked, it posts back and I use the ModalPopupExtender to bring up a modal dialog that can contain a user control that is loaded dynamically, depending on what was clicked. After a button on the modal popup is clicked, I need to save changes into a hidden field on the form. However, after postback, the control is totally gone. How do I need to recover the data that was in the form?
Another option would be to use the viewstate to track data from the control. You just have to manually set the data in the viewstate.
I prefer this method because you can store any serializable object in the viewstate, so it gives you more control over how the data is stored. Plus, you can use viewstate encryption to encrypt the data and prevent users from seeing the contents.