.net 2003
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             }


.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             }


posted on 2007-05-22 16:46  凌度  阅读(374)  评论(0编辑  收藏  举报