Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 32. ASP.NET Deployment and Confi... > Adding/Retrieving Custom Configurati...

Adding/Retrieving Custom Configuration Settings

Often, you’ll need to store information into the configuration file that is not part of the standard sections. There are two places you can store information in the web.config file. One is in the <appSettings> section. The other is in your own custom section.

Adding and Reading <appSettings>

You can add custom entries to the web.config file. In fact, there’s a section specifically for customized application settings. This section is <appSettings>, and it occurs outside of the <system.web> section. A typical entry in this section is a connection string to a database. The following shows how this might appear in the <appSettings> section:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint