.net 2003
.net 2005
1 NameValueCollection configSettings = (NameValueCollection)ConfigurationSettings.GetConfig(configSection)
2 if ( configSettings != null )
3 {
4 string configValue = configSettings[configKey] as string;
5 if ( configValue != null )
6 {
7 return configValue;
8 }
9 }
2 if ( configSettings != null )
3 {
4 string configValue = configSettings[configKey] as string;
5 if ( configValue != null )
6 {
7 return configValue;
8 }
9 }
.net 2005
1 NameValueCollection configSettings = (NameValueCollection)System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection(configSection);
2 if ( configSettings != null )
3 {
4 string configValue = configSettings[configKey] as string;
5 if ( configValue != null )
6 {
7 return Globals.ApplicationVRoot + configValue;
8 }
9 }
2 if ( configSettings != null )
3 {
4 string configValue = configSettings[configKey] as string;
5 if ( configValue != null )
6 {
7 return Globals.ApplicationVRoot + configValue;
8 }
9 }