You want to provide a mechanism to periodically remove user profile data that is no longer being used.
ProfileManager class to find inactive profiles, display them in an ASP.NET page for the manager to review, and then use the
ProfileManager to delete the desired profiles.
In the .aspx file:
Add a drop-down list or other control to allow selection of the authentication option.
Add a drop-down list or other control to allow selection of the inactive period.
Add a button to initiate the search for the profile.
GridView to display the profiles matching the search parameters.
Provide the ability to delete one or more profiles.
In the code-behind class for the page, use the .NET language of your choice as follows:
Initialize the authentication option drop-down control with the available options.
Initialize the inactive period drop-down control with the available options.
In the event handler for the Search button click event, use the
GetAllInactive-Profiles method of the
ProfileManager class to get the profiles matching the search parameters and then bind the profile data to a
In the event handler for the Delete All button click event, use the
DeleteInactiveProfiles method of the
ProfileManager class to delete the displayed profiles.
The code we have created to illustrate this solution is shown in Examples 10-11, 10-12 through 10-13. Example 10-11 shows the .aspx file for the page used to manage profiles. The code-behind classes ...