I think I understand the issue. See if the below would fit.
If you want to (or currently) display the Profile fields also in the grid along with the membershipuser fields, then:
- you can add profile fields as property members to MembershipUtil class and
- update Grid to show profile fields as well. This will take care of loading/updating MembershipUtil object with both user and profile fields.
- In GetMembershipUtil method, get profile details also from store and transfer them to MembershipUtil object properties.
To load profile from store, Create method itselft can be used like:
ProfileBase p = ProfileBase.Create(MembershipUtil.Username);
// use p.GetPropertyValue method to read values from profile object and then transfer them to MembershipUtil object.
- In UpdateUser method, when updating for user details, Save profile details also
To save profile:
ProfileBase p = ProfileBase.Create(MembershipUtil.Username);
// use p.SetPropertyValue method to set values in profile object
p.Save();
Make sure all the profile properties are added in web.config as well.