返回首页

在web.config

<connectionStrings>

  <add name="Connection" connectionString="Data Source=ESS-8\\SQLEXPRESS;Initial Catalog=Inventory1;Integrated Security=True;" providerName="System.Data.SqlClient"/>

</connectionStrings>

页上的
{C}
错误是
'string' does not contain a definition for 'Open' and no extension method 'Open' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)
:7909353 |会员

回答

评论会员:阅读:imgsrc=] 时间:2012/02/06
汗莫哈末faizan
评论会员:游客 时间:2012/02/06
是可以调用从web.config轻松连接名称e.g:声明在web.config中的ConnectionString路径,这样的{体C3}然后在你的代码调用的ConnectionString名称使用该连接字符串对象,随时随地u要使用:王子安东尼G:|在web.config{C5的}在Login.aspx.cs{5233}