But I think I can do it by modifing the filteredUsers() function of ManageUser.aspx page.
Code:
MembershipUserCollection AllUsers = new MembershipUserCollection();
MembershipUserCollection AllAdmins = new MembershipUserCollection();
private void GetUsersByName(String FN, String LN)
{
string[] AllAdmins = Roles.GetUsersInRole("Admin");
if (FN != null)
{
foreach (MembershipUser User in AllUsers)
{
foreach (string Admin in AllAdmins)
{
ProfileCommon profile = new ProfileCommon();
profile = profile.GetProfile(User.UserName);
if (FN == profile.FirstName)
{
requiredUsers.Add(User);
}
}
}
}
if (LN != null)
{
foreach (MembershipUser User in AllUsers)
{
foreach (string Admin in AllAdmins)
{
ProfileCommon profile = new ProfileCommon();
profile = profile.GetProfile(User.UserName);
if (LN == profile.LastName)
{
requiredUsers.Add(User);
}
}
}
}
}
But I guess there is some issue with the loops placement because in some conditions this code works and in others not.
What is your opinion about this solution?
Regards,
dazy.