相关疑难解决方法(0)

如何从webconfig中的connectionstring中检索databaseName和serverName?

如何从Web Config获取连接字符串?我想在我的主ASP.net页面(C#)上显示数据库和服务器名称.

我的web.config中的连接字符串如下所示:

<add name="Application_ConnectionString" connectionString="Data Source=ServerName;Initial Catalog=DatabaseName;Persist Security Info=True;Connection Timeout =60;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>
Run Code Online (Sandbox Code Playgroud)

asp.net

14
推荐指数
3
解决办法
2万
查看次数

标签 统计

asp.net ×1