码迷,mamicode.com
首页 >  
搜索关键字:configurationmanager    ( 293个结果
EntLib 自动数据库连接字符串加密
const string provider = "RsaProtectedConfigurationProvider"; Configuration config = null; config = ConfigurationManager...
分类:数据库   时间:2015-01-16 18:27:31    阅读次数:243
简单的SqlHelper
// ExecuteNonQuery 构建public static int ExecuteNonQuery(string sql,params SqlParameter[] parameters){ string Str = ConfigurationManager.ConnectionStrin...
分类:数据库   时间:2015-01-13 17:31:20    阅读次数:275
项目文件中含有两个config文件,app.config与app1.config,如何获取app1.config中的配置
想要通过配置文件配置C#前台画面,好奇做了以下测试:在项目中新建了app.config与app1.config两个配置文件,请教一下各位高手如果想从app1.config中读取配置信息应该如何读取?采用ConfigurationManager.AppSettings 属性似乎只能读取到app.con...
分类:移动开发   时间:2015-01-09 00:05:22    阅读次数:215
Configuration.ConfigurationSettings.AppSettings已过时
1.在项目中引用System.Configuration.dll,在需要的页面加上using System.Configuration;2.把ConfigurationSettings.AppSettings["字符串"]; 替换成ConfigurationManager.AppSettings["...
分类:移动开发   时间:2015-01-08 19:26:49    阅读次数:169
C# App.config 详解
读语句: String str = ConfigurationManager.AppSettings["DemoKey"];写语句: Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLeve...
分类:移动开发   时间:2015-01-06 09:45:07    阅读次数:308
C#文件上传到服务器——转载至wcj1984abc
C# 上传文件webconfig 配置 #region 判断上传文件类型 protected bool IsAllowableFileType() { //从web.config读取判断文件类型限制 string strFileTypeLimit = ConfigurationManager.App...
分类:Windows程序   时间:2015-01-02 17:28:23    阅读次数:176
c#引用web.config中的ConnectionString
c#引用web.config中的ConnectionString 获取的办法是:ConfigurationManager.ConnectionStrings["JGXTConnectionString"].ConnectionString;或者这么写web.config 获取办法是:Config.....
分类:Windows程序   时间:2015-01-01 22:30:30    阅读次数:324
配置文件的读写(转载自逆心)
配置文件的读写 System.ConfigurationManager类用于对配置文件的读取。其具有的成员如下:一、AppSettings AppSetting是最简单的配置节,读写非常简单。名称说明AppSettings获取当前应用程序默认配置的 AppSettingsSection 数据Co.....
分类:其他好文   时间:2014-12-31 21:25:45    阅读次数:243
把excel读入DataTable
1 private DataTable GetExcelTable(DataRow row) 2 { 3 4 string path = ConfigurationManager.AppSettings["UploadPath"]...
分类:其他好文   时间:2014-12-28 16:47:34    阅读次数:207
asp.net 中excel 导入数据库
protected void Button1_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager....
分类:数据库   时间:2014-12-28 01:47:04    阅读次数:267
293条   上一页 1 ... 19 20 21 22 23 ... 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!