Iterating profiles

  • Thread starter Thread starter etam
  • Start date Start date
E

etam

Hi,

is there any solution to iterate through all user profiles?

Thanks in advance,
Etam.
 
Use ProfileInfo.UserName in conjunction with
ProfileManager.FindProfilesByUserName() to get the full profile object.
 
Use ProfileInfo.UserName in conjunction with
ProfileManager.FindProfilesByUserName() to get the full profile object.

Is this a good solution:

ProfileInfoCollection pic =
ProfileManager.GetAllProfiles(ProfileAuthenticationOption.All);
foreach(ProfileInfo pi in pic) {
ProfileCommon p =
(ProfileCommon)ProfileCommon.Create(pi.UserName);
System.Diagnostics.Debug.WriteLine(p.Name.Caption);
}

?
 
Use ProfileInfo.UserName in conjunction with
ProfileManager.FindProfilesByUserName() to get the full profile object.

ProfileManager.FindProfilesByUserName() also gives
ProfileInfosCollection.
 
Apologies for the copy/paste mistake. I meant using Profile.GetProfile()
along with ProfileInfo.UserName. You might also want to use
ProfileManager.GetAllProfiles() for any filtering.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

FormViewList? 1
GridView without database 2
FormView with DropDownList 2
Many user defined controlls 1
ASP.NET on Linux 12
DataSource Where 1
Text from TextBox in DataList 6
Specific data control 3

Back
Top