Asp.net2.0里访问Web.config的Section的示例

发表时间:2007-4-26 11:28:00
System.Configuration.Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
            System.Web.Configuration.PagesSection pagesSection = config.GetSection("system.web/pages") as System.Web.Configuration.PagesSection;
            System.Web.HttpContext.Current.Response.Write(pagesSection.Theme);

你可能感兴趣的:(asp.net)