Key Scenarios
This section describes the most common situations in which you might use the Application Setting Manager. Each topic in this section describes a realistic scenario, identifies the solution, and provides code to demonstrate how to use the Application Setting Manager to complete the task. Each topic also includes usage notes and hints where applicable.
The scenarios are as follows:
- Using a Feature Receiver to Create a Configuration Setting. This scenario illustrates how you can use the Application Setting Manager to add a configuration setting from within a feature receiver class.
- Using a Feature Receiver to Remove a Configuration Setting. This scenario illustrates how you can use the Application Setting Manager to remove a configuration setting from within a feature receiver class, to provide a cleanup operation when your application or component is uninstalled.
- Reading Configuration Data in a SharePoint Web Part. This scenario illustrates how you can use the Application Setting Manager to retrieve configuration settings from code running within the SharePoint context.