如何将sqlserver2005与asp.net网站连接 [英] how to connect a sqlserver2005 with asp.net website
本文介绍了如何将sqlserver2005与asp.net网站连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以用示例代码向我解释吗?
can anyone explain me with a example coding?
推荐答案
^ ]
PS:您可以优化搜索以获取更多特定详细信息.
Let Me Google That For You[^]
PS: You may refine your search for more specific details.
在网络配置中已在应用"设置中建立为
in web confiq made connection in App setting as
<appSettings>
<add key="conn" value="server=servername;database=databasename; integrated security=true"/>
</appSettings>
并在aspx页面中将代码编写为:
SqlConnection con =新的SqlConnection(ConfigurationManager.AppSettings ["conn"]);
and in aspx page write code as:
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["conn"]);
这篇关于如何将sqlserver2005与asp.net网站连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文