【发布时间】:2011-11-24 11:41:31
【问题描述】:
我在网络配置文件中有一个连接字符串。 我在所有文件中都使用了这个与 name 的连接。
连接字符串是这样的
<add name="connectionname" connectionString="Data Source=DEVELOPER1;Initial Catalog=dbname;Persist Security Info=True;User ID=sa;Password=some"/>
我想根据下拉菜单更改登录页面中的初始目录(数据库名称),并且该更改对于应用程序将保持不变。
【问题讨论】:
-
您可以在
web.config文件中添加多个连接字符串,在dropdown中显示这些名称,然后继续 -
@V4Vendetta 正如我所提到的,我在所有页面中都使用了连接名称..
标签: c# asp.net database connection-string