获取LDAP下的User类的所有的属性名
qiurj 2003-02-14 04:06:10 我利用C#编写。aspx文件
我现在可以获取到一些属性名,就不能取到所有的属性名?
System.DirectoryServices.PropertyCollection properties = de.Properties;
foreach(string name in properties.PropertyNames){
DataRow topRow = ds.Tables["users"].NewRow();
foreach(object o in properties[name]){
topRow["PropertyName"] = name;
topRow["PropertyValue"] = o.ToString();
}
ds.Tables["users"].Rows.Add(topRow);
}