1
下面給出的多個值是現有asp.net web服務程序的web.config文件(.asmx文件)的Web.config - 用於設置
以下代碼設置TEST爲EEE的值。
<setting name="TEST" serializeAs="String">
<value>EEEE</value>
</setting>
這是從使用的代碼accccessed
TESTIntegrationWS.Properties.Settings.Default.TEST
如何設置從該名「TEST」和訪問多個值碼?
Web.config文件
<?xml version="1.0" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="TESTIntegrationWS.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<TESTIntegrationWS.Properties.Settings>
<setting name="TEST" serializeAs="String">
<value>EEEE</value>
</setting>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
</TESTIntegrationWS.Properties.Settings>
</applicationSettings>
<system.web>
<compilation debug="true" />
</system.web>
</configuration>
謝謝!得到它的工作! – stackuser
不客氣 – Adil