Accessing configuration files programatically CodeSample - Accessing connection strings
From Visual WebGui Wiki
| This article will have a few sections added to it soon, based on the following article type skeleton: NewCodeSampleTemplate |
Overview
This codesample shows how you can programmatically access connection strings stored in web.config.
VB.NET Code
connStr = System.Configuration.ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString
C# Code
connStr = System.Configuration.ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString;
