DanInMa
12-30-2011, 06:19 PM
ok, so this is what im using so far. ( Im learning, bear with me) It lists all the propertynames, I need to list the names and then also the values of those properties
GetUser(user) returns a valid DirectoryEntry Object, btw.
oh yeah, C#, asp.net 4.0
protected void Button1_Click(object sender, EventArgs e)
{
Literal1.Text = "";
string user = User.Identity.Name.ToString().Split("\\".ToCharArray())[1];
foreach (string strAttrName in GetUser(user).Properties.PropertyNames)
{
Literal1.Text += strAttrName+"<br />";
}
}
I can access individual properties, but I want to iterate through all of them so I can just exclude a few and keep the rest, etc..
I am doing this using :
Literal1.Text += "<br />" + GetUser(user).Properties["mail"][0];
GetUser(user) returns a valid DirectoryEntry Object, btw.
oh yeah, C#, asp.net 4.0
protected void Button1_Click(object sender, EventArgs e)
{
Literal1.Text = "";
string user = User.Identity.Name.ToString().Split("\\".ToCharArray())[1];
foreach (string strAttrName in GetUser(user).Properties.PropertyNames)
{
Literal1.Text += strAttrName+"<br />";
}
}
I can access individual properties, but I want to iterate through all of them so I can just exclude a few and keep the rest, etc..
I am doing this using :
Literal1.Text += "<br />" + GetUser(user).Properties["mail"][0];