Hi guy,
i need to get teh value of a specific user subtype Named "Manger" by code how can i do this?
This i s my wrong code
string accountName = "dc07\\TestUser";
using (SPSite site = new SPSite("http://c4968397007"))
{
SPServiceContext serviceContext = SPServiceContext.GetContext(site);
try
{
UserProfileManager userProfileMgr = new UserProfileManager(serviceContext);
ProfilePropertyManager profilePropMgr = new UserProfileConfigManager(serviceContext).ProfilePropertyManager;
ProfileSubtypePropertyManager subtypePropMgr = profilePropMgr.GetProfileSubtypeProperties("Manager");
UserProfile userProfile = userProfileMgr.GetUserProfile(accountName);
Console.WriteLine(subtypePropMgr);
Console.Read();
}
catch (System.Exception e)
{
Console.WriteLine(e.GetType().ToString() + ": " + e.Message);
Console.Read();
}
}