O'Reilly logo

Microsoft SharePoint 2010 Development with Visual Studio 2010: Expert Cookbook by Balaji Kithiganahalli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Getting ready

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...

  1. If you have closed your Visual Studio IDE, launch it now as an administrator and open ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required