asp.net2.0中读取web.config数据库连接字符串2种方法
2006-11-26 16:46
417 查看
方法一:
string myconn = system.configuration.configurationmanager.connectionstrings["sqlconnectionstring"].connectionstring;
方法二:
string connstring = system.web.configuration.webconfigurationmanager.connectionstrings["sqlconnectionstring"].tostring();
string myconn = system.configuration.configurationmanager.connectionstrings["sqlconnectionstring"].connectionstring;
方法二:
string connstring = system.web.configuration.webconfigurationmanager.connectionstrings["sqlconnectionstring"].tostring();
相关文章推荐
- asp.net2.0中读取web.config数据库连接字符串2种方法
- asp.net2.0中读取web.config数据库连接字符串2种方法
- asp.net2.0中2种读取web.config数据库连接字符串
- asp.net2.0中2种读取web.config数据库连接字符串
- asp.net2.0中2种读取web.config数据库连接字符串
- asp.net2.0中获得web.config中数据库连接字符串的2种方法
- asp.net2.0中读取web.config数据库连接字符串
- asp.net2.0中读取web.config数据库连接字符串
- asp.net2.0中读取web.config连接字符串或是其他配置信息的方法
- 怎样从ASP.NET2.0中读取连接字符串的设置
- 怎样从ASP.NET2.0中读取连接字符串的设置
- 读取连接字符串最简单的方法
- C# 多种方法读取和设置连接字符串
- 怎样从ASP.NET 2.0中读取连接字符串的设置新增方法
- 获取web.config中数据库连接字符串的2种方法
- 获得web.config中数据库连接字符串的2种方法
- web开发时读取web.config中的数据库连接字符串的方法
- C#读取app.config文件中的连接字符串的方法
- C#读取app.config文件中的连接字符串的方法
- 从Web.config文件中读取连接字符串的两种方法