我在使用C#和ASP.NET的.config文件中有以下内容:
<?xml version='1.0' encoding='utf-8' ?>
<appSettings>
<add key="ConnectionString"
value="Data Source=(local);Initial Catalog=dbname;User ID=myuser;Password=mypass;" />
</appSettings>
我需要以下内容:
<?xml version='1.0' encoding='utf-8' ?>
<appSettings>
<add key="userkey" value="myuser" />
<add key="passkey" value="mypass" />
<add key="ConnectionString"
value="Data Source=(local);Initial Catalog=dbname;User ID=[userkey];Password=[passkey];" />
</appSettings>
这可能吗?正确的语法是什么?