G
GAZ
Hello all,
We have a bit of a problem with application settings and user control. In
short, we have developed a user control that should, as it happenes, get a
value stored in application settings of its host application. The app.config
of the host application looks like this:
<appSettings>
<add key="SQLConnectionString" value="some value" />
</appSettings>
<userSettings>
<Test_Control_Library.My.MySettings>
<setting name="UserSQL" serializeAs="String">
<value>User</value>
</setting>
</Test_Control_Library.My.MySettings>
</userSettings>
Now, our control can read the SQLConnectionString value from <appSettings>
by using:
System.Configuration.ConfigurationSettings.AppSettings("SQLConnectionString")
However, what we really need to get is the value stored in the UserSQL
setting under <userSettings> and we haven't got a foggiest how to do it. The
reason behind using user settings is that the UserSQL value can change
during the course of work and hence all controls should reflect that change.
Any help would be greatly appreciated.
BR,
GAZ
We have a bit of a problem with application settings and user control. In
short, we have developed a user control that should, as it happenes, get a
value stored in application settings of its host application. The app.config
of the host application looks like this:
<appSettings>
<add key="SQLConnectionString" value="some value" />
</appSettings>
<userSettings>
<Test_Control_Library.My.MySettings>
<setting name="UserSQL" serializeAs="String">
<value>User</value>
</setting>
</Test_Control_Library.My.MySettings>
</userSettings>
Now, our control can read the SQLConnectionString value from <appSettings>
by using:
System.Configuration.ConfigurationSettings.AppSettings("SQLConnectionString")
However, what we really need to get is the value stored in the UserSQL
setting under <userSettings> and we haven't got a foggiest how to do it. The
reason behind using user settings is that the UserSQL value can change
during the course of work and hence all controls should reflect that change.
Any help would be greatly appreciated.
BR,
GAZ