ASP.NET数据库连接字符串写在config.web配置文件中
2015-07-27 10:12
1061 查看
using System.Configuration; //添加引用 //具体调用 private static string CONNECTION_STRING = ConfigurationManager.ConnectionStrings["dbconstr"].ConnectionString; //配置文件下 <connectionStrings> <add name="dbconstr" connectionString="Data Source=数据库服务地址;Initial Catalog=数据库名;Integrated Security=false;User ID=sa;Password=sa"/> </connectionStrings>
http://blog.csdn.net/rart2008/article/details/5779784/
相关文章推荐
- ASP.NET MVC异常处理
- ASP.NET POST XML JSON数据,发送与接收
- asp.net中BeginInvoke和EndInvoke方法使用方法
- The return type is incompatible with JspSourceDependent.getDependants():JasperException问题分析与解决方法
- The return type is incompatible with JspSourceDependent.getDependants():JasperException问题分析与解决方法...
- 搜索引擎关键词劫持之asp篇
- Spring 之AOP AspectJ切入点语法详解(最全了,不需要再去其他地找了)
- 为了树莓派IIraspberrypi安装emacs+ecb+cedet+session+color-theme+cscope+linum
- 动态生成页面(一)——ASP.NET中Literal使用
- Maticsoft.Framework for Asp.Net框架应用实例(一)
- Asp.NET MVC3 使用 SignalR 实现推
- Metasploit测试暴雷漏洞 (编号CVE-2012-1889)
- 《ASP.NET》数据绑定—DataList实践篇
- 利用Metasploit测试一个古老的IE8漏洞(编号CVE-2012-1875)
- ASP、JSP、PHP 三种技术比较
- ASP、JSP、PHP 三种技术比较
- asp.net 弹出框信息
- asp.net重写服务器控件
- 《ASP.NET》数据绑定—DataList
- AspJson应用