web.config and WebConfigurationManager
The 2.0 framework obsoletes many methods from 1.1.
A line like:
System.Configuration.ConfigurationSettings.AppSettings(“DocumentDirectory”)
results in a compiler warning.
Public Shared ReadOnly Property AppSettings() As System.Collections.Specialized.NameValueCollection' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings'.
The new method is in the System.Web.Configuration namespace and is called WebConfigurationManager.
WebConfigurationManager.AppSettings(“DocumentDirectory”)
Trackback URI |