我有我在下面定义的数据库<appSettings>
连接web.comfig
:
<appSettings>
<add key="ConnStr"
value="Data Source=dsk-159\SQLEXPRESS;Initial Catalog=master;Integrated Security=True"/>
</appSettings>
但问题是我无法从我的 aspx 页面访问它,因为我正在尝试这样
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:goldsConnectionString %>"
SelectCommand="SELECT distinct TechnologyId , [TechnologyName], [ChildId] FROM [TreeTable] where childid is null AND technologyid in(@hid1)">
<SelectParameters>
<asp:ControlParameter ControlID="hid1" Name="hid1" DefaultValue="23" />
</SelectParameters>
代替<connectionStrings>
我想定义它<appSettings>
请告诉正确的语法。