Every web application in ASP.NET includes a web.config file that configures fundamental settings from error message to security.
It uses a predefined XML format. THe entire content of the file is nested in a root<configuration> element.The elementary structure of the Web.config
is:-
| <?xml version="1.0" ?> <configuration> <configSections>...</configSections> <appSettings>...</appSettings> <connectionStrings>...</connectionStrings> <system.web>...</system.web> <system.codedom>...</system.codedom> <system.webServer>...</system.webServer> </configuration> |
remember it is case sensitive, like all XML documents.
Now it has <appSettings> section allows us to add our own miscellaneous pieces of information.
The <connectionStrings> section allows us to define the connection information for accessing a database. Finally, the <system.web> section holds every ASP.NET setting we’ll need to configure.
Inside the <system.web> element are separate elements for each aspect of website
configuration. we can include as few or as many of these as we want.Here coms the concept of nested configuration.
It uses multilayered configuration.
Storing custom setting in the web.config file
using neste <appSetings> in the root <configuraion>element
here is the basic :-

Suresh PaldiaPosted Nov 10, 2010, 7:55 AM
Though the article is very old.. but i found it useful.. Thank You