Adding configuration properties to web parts
The web parts are configured by authorized users. You can use that as an opportunity and provide properties that can be set during the configuration time rather than hard coding in the code. In this recipe, we will learn how to add those configuration properties to the web parts.
In our first recipe, we had hard coded the database connection string. In this recipe, we will modify the web part to get the database connection string from the configuration property.
Since this recipe is a modification of the first recipe, you should complete that recipe successfully in order to follow this one.
How to do it...
- If you have closed your Visual Studio IDE, launch it now as an administrator and open ...