本文介绍了用于AD中搜索过滤器的IF语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
首先请原谅我重复几乎相同的问题.
但是我必须创建一个新的线程bcoz,它将在将来有所帮助.
现在的代码是
Hi
First pardon me to repeat almost same kinda question.
but i have to create a new thread bcoz it will helps some in the future.
right now the code is
if (username.Contains("."))
{
string Fname = username.Substring(0, username.IndexOf("."));
Fname = Fname.Replace(" ", "");
string[] splitString = username.Split(new char[] { '.' });
username = splitString[splitString.Length - 1];
//*****Am trying to write IF statement here like this but need some help to complete this if statement.
If (search.Filter = "(sn=" + username + ")&(givenname=" + Fname + ")";
search.Filter = "(sn=" + username + ")";
}
推荐答案
这篇关于用于AD中搜索过滤器的IF语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!