连续读取区块应用程序设置值

string appPath = this.Request.ApplicationPath;
        Configuration config = WebConfigurationManager.OpenWebConfiguration(appPath);
        AppSettingsSection app = config.AppSettings;
        foreach (string key in WebConfigurationManager.AppSettings) {
            Response.Write(string.Format("{0}--{1}<br/>", key, app.Settings[key].Value));
        }
posted on 2007-07-29 14:45  上校  阅读(218)  评论(0编辑  收藏  举报