I have a path in active directory and need to get some values for that path with .net 2.0. I can see these values with adsi edit, but would like to populate a combobox with them.
Here is what I have, but it's not working. What am I missing?
Dim strSoftType As String = ""
If RadioButton2.Checked = True Then
strSoftType = "OU=Software,"
ElseIf RadioButton1.Checked = True Then
strSoftType = "OU=Softserv,"
Dim SoftName = "OU=" & ComboBox1.Text.Trim & ","
Dim strTypeInstall As String = "CN=" & ComboBox2.Text.Trim & ","
Dim strSoftwareLoc, strSoftwareName As DirectoryEntry
Dim strResult As SearchResult
Dim strSoftwareList As String = ""
strSoftwareLoc = New DirectoryEntry("LDAP://" & strTypeInstall & SoftName & strSoftType & "OU=Radia,OU=Applications,DC=mydomain,DC=com")
Dim strSearch As New DirectorySearcher(strSoftwareLoc)
.SearchScope = SearchScope.Subtree
strSearch.SearchRoot = strSoftwareLoc
For Each strResult In strSearch.
Dim title As DirectoryEntry
title = strResult.GetDirectoryEntry.Properties("nvdPolicy").Value '***************** I FAIL HERE
ComboBox3.Items.Add(title) 'add to combobox and remove OU=