.net 2.0提取app.config中的connectionString
2008-01-05 15:28
239 查看
首先引用System.configuration文件.
SqlConnection conn = new SqlConnection();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ToString();
SqlConnection conn = new SqlConnection();
conn.ConnectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ToString();
相关文章推荐
- Read/Write App.config with .NET 2.0/Enterprise Library
- Read/Write App.Config File with .NET 2.0
- asp.net 2.0中加密web.config /App.config
- Read/Write App.Config File with .NET 2.0
- asp.net 2.0中加密web.config /App.config
- 一步一步教你玩转.NET Framework的配置文件app.config
- ASP.NET 2.0加密Web.config 配置文件
- ASP.NET 2.0加密解密Web.config配置文件
- ASP.NET 2.0加密Web.config 配置文件 (终极版)
- asp.net读取Web.config的<appSettings></appSettings>
- [VB.NET]vs2005下怎么读取app.config?
- Forward:使用.NET 2.0读写App.config
- 关于C#和ASP.NET中对App.config和Web.config文件里的[appSettings]和[connectionStrings]节点进行新增、修改、删除和读取相关的操作
- asp.net 2.0中加密web.config
- .net类库获取当前类库的配置(dll的app.config读写)
- .NET 创建 classlib时,netcoreapp2.0与netstandard2.0的区别
- 在asp.net 2.0中的web.config文件中调用外部文件
- C#/ASP.NET应用程序配置文件app.config/web.config的增、删、改操作
- .net App.config 自定义配置 获取多个节点
- [导入]ASP.NET 2.0加密Web.config 配置文件