注册 登录
编程论坛 ASP.NET技术论坛

vs2005 and vs03

apple0129 发布于 2008-04-09 21:59, 523 次点击
SqlConnection con = new SqlConnection(
                ConfigurationSettings.AppSettings["SQLCONNECTIONSTRING"].ConnectionString

 I use vs2003 fault:

 “string”并不包含对“ConnectionString”的定义
fault
1 回复
#2
hebingbing2008-04-09 22:04
你将你的SQLCONNECTIONSTRING在web.config中定义,完了在别的页面这样引用……
SqlConnection con = new SqlConnection(
                ConfigurationSettings.AppSettings["SQLCONNECTIONSTRING"])
1