Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to get a value to return in a textbox Pin
davidnz8-Apr-11 15:32
davidnz8-Apr-11 15:32 
GeneralRe: How to get a value to return in a textbox Pin
Justiin12658-Apr-11 16:44
Justiin12658-Apr-11 16:44 
GeneralRe: How to get a value to return in a textbox Pin
Rotted Frog8-Apr-11 22:29
Rotted Frog8-Apr-11 22:29 
Questionthread.interrupt only working once Pin
Member 74021668-Apr-11 10:40
Member 74021668-Apr-11 10:40 
AnswerRe: thread.interrupt only working once Pin
davidnz8-Apr-11 12:13
davidnz8-Apr-11 12:13 
AnswerRe: thread.interrupt only working once Pin
Ganesh Kumar Kaki13-Apr-11 1:27
Ganesh Kumar Kaki13-Apr-11 1:27 
QuestionGlobal Hook : need help with SysMsgProc Pin
moums8-Apr-11 8:12
moums8-Apr-11 8:12 
QuestionQuerying LDAP from an application: get a search result when one attribute of a multiple attribute matches Pin
Bernhard Hiller8-Apr-11 1:28
Bernhard Hiller8-Apr-11 1:28 
For test purposes, let us take a user with following properties:
samaccountname=testuser1,OU=ou1,OU=test unit,...
Please note that there are two entries for the attribute OU.
Now I try to find out if OU=ou1 is set for user testuser1.
In C# (.NET 3.5), I do:
DirectoryEntry ent = new DirectoryEntry("LDAP://our.domain");
DirectorySearcher searcher = new DirectorySearcher(ent);
searcher.Filter = "(&(samaccountname=testuser1)(OU=ou1))";
searcher.SearchScope = SearchScope.Subtree;
SearchResult result = searcher.FindOne();

... and result is null.
searcher.Filter = "(samaccountname=testuser1)";
or
searcher.Filter = "(OU=ou1)";
get a result.
How does the correct Filter look like for the scenario described above?
AnswerRe: Querying LDAP from an application: get a search result when one attribute of a multiple attribute matches Pin
Ravi Bhavnani8-Apr-11 9:10
professionalRavi Bhavnani8-Apr-11 9:10 
QuestionWindow 7 and WebClient Class Pin
Wolfram Steinke7-Apr-11 17:32
Wolfram Steinke7-Apr-11 17:32 
AnswerRe: Window 7 and WebClient Class Pin
Bernhard Hiller7-Apr-11 21:58
Bernhard Hiller7-Apr-11 21:58 
GeneralRe: Window 7 and WebClient Class Pin
Wolfram Steinke9-Apr-11 0:20
Wolfram Steinke9-Apr-11 0:20 
AnswerRe: Window 7 and WebClient Class Pin
#realJSOP8-Apr-11 8:07
mve#realJSOP8-Apr-11 8:07 
AnswerRe: Window 7 and WebClient Class Pin
Ravi Bhavnani8-Apr-11 11:27
professionalRavi Bhavnani8-Apr-11 11:27 
QuestionA problem with ListView in VB.Net [modified] Pin
yoh.asakura7-Apr-11 7:12
yoh.asakura7-Apr-11 7:12 
GeneralRe: A problem with ListView in VB.Net Pin
Pete O'Hanlon7-Apr-11 7:16
mvePete O'Hanlon7-Apr-11 7:16 
GeneralRe: A problem with ListView in VB.Net Pin
Colin Angus Mackay8-Apr-11 14:09
Colin Angus Mackay8-Apr-11 14:09 
GeneralRe: A problem with ListView in VB.Net Pin
Pete O'Hanlon9-Apr-11 4:24
mvePete O'Hanlon9-Apr-11 4:24 
GeneralRe: A problem with ListView in VB.Net Pin
Colin Angus Mackay10-Apr-11 23:41
Colin Angus Mackay10-Apr-11 23:41 
GeneralRe: A problem with ListView in VB.Net Pin
Pete O'Hanlon11-Apr-11 0:38
mvePete O'Hanlon11-Apr-11 0:38 
AnswerRe: A problem with ListView in VB.Net PinPopular
Luc Pattyn7-Apr-11 7:35
sitebuilderLuc Pattyn7-Apr-11 7:35 
GeneralRe: A problem with ListView in VB.Net Pin
Mycroft Holmes7-Apr-11 22:21
professionalMycroft Holmes7-Apr-11 22:21 
AnswerRe: A problem with ListView in VB.Net Pin
#realJSOP8-Apr-11 8:08
mve#realJSOP8-Apr-11 8:08 
AnswerRe: A problem with ListView in VB.Net Pin
Dalek Dave9-Apr-11 4:56
professionalDalek Dave9-Apr-11 4:56 
QuestionMessage Removed Pin
7-Apr-11 2:34
fififlowertot7-Apr-11 2:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.