ASP.NET修改web.config配置 - asp.net 教程
来源:互联网 发布:python中文版下载 编辑:程序博客网 时间:2024/05/18 12:41
1 using System; 2 using System.Data; 3 using System.Configuration; 4 using System.Collections; 5 using System.Web; 6 using System.Web.Security; 7 using System.Web.UI; 8 using System.Web.UI.WebControls; 9 using System.Web.UI.WebControls.WebParts; 10 using System.Web.UI.HtmlControls; 11 using System.Xml; 12 13 public partial class Default2 : System.Web.UI.Page 14 { 15 protected void Page_Load(object sender, EventArgs e) 16 { 17 Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath); 18 19 //操作appSettings 20 AppSettingsSection appseting = (AppSettingsSection)config.GetSection("appSettings"); 21 appseting.Settings["web"].Value = "zsq"; //修改设置 22 appseting.Settings.Add("name", "sq"); //增加设置 23 24 //操作connectionStrings 25 ConnectionStringsSection conSection = (ConnectionStringsSection)config.GetSection("connectionStrings"); 26 conSection.ConnectionStrings["constr"].ConnectionString = "~/App_Data/shaoqun.mdb"; //修改设置 27 conSection.ConnectionStrings["constr"].ProviderName = "System.Data.OleDb"; 28 conSection.ConnectionStrings.Add(new ConnectionStringSettings("constr2", "aaaaa", "System.Data.OleDb")); //增加设置 29 30 config.Save(); 31 } 32 }
- ASP.NET修改web.config配置 - asp.net 教程
- asp.net修改web.config
- asp.net 修改web.config
- asp.net代码修改web.config
- ASP.NET web.config
- ASP.NET WEB.CONFIG
- ASP.NET Web.config
- ASP.NET动态配置web.config文件
- ASP.Net 2.0的Web.config配置
- asp.net中web.config配置详解
- [转]ASP.NET Web.config配置详解
- ASP.NET web.config配置大全
- Asp.net中的web.config配置
- asp.net权限控制配置web.config
- ASP.NET web.config配置大全
- asp.net web.config配置节说明
- Asp.net中的web.config配置
- asp.net中web.config配置
- timeSetEvent
- 用GetprocAddress得到地址后该如何调用这个函数
- mfc透明
- asp.net生成高质量缩略图通用函数c#代码,支持多种生成方式 - asp.net 教程
- mfc透明
- ASP.NET修改web.config配置 - asp.net 教程
- 上网本 Ubuntu下安装android遇到的问题及解决方案
- MINE
- codesoso&&&&&mfc
- 给GridView、Repeater、DataList的行增加编号、序号 - asp.net 教程
- poj 2032
- 也谈qt中QMdiArea和QSubWindow
- 抽刀断水水更流,举杯销愁愁更愁
- zz:知其所以然(以算法学习为例)