<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 文件路徑 ``` ConfigHelper.cs ``` ## 1、得到web.config AppSetting 下key值 ``` /// <summary> /// 得到web.config AppSetting 下key值 <appSettings><add key="useEncrypt" value="false"/></appSettings> /// </summary> /// <param name="key">關鍵字</param> /// <returns>返回值</returns> public static string GetValue(string key) { try { return ConfigurationManager.AppSettings[key]; } catch (Exception ex) { throw new System.Exception(ex.Message); } } ``` ## 用法 ``` var useValidateCode = ConfigHelper.GetValue("showValidateCode"); ``` ## 2、設置web.config AppSetting 下key值 ``` /// <summary> /// 設置應用程序配置節點,如果已經存在此節點,則會修改該節點的值,否則添加此節點 /// </summary> /// <param name="key">節點名稱</param> /// <param name="value">節點值</param> public static void SetAppSetting(string key, string value) { Configuration config = WebConfigurationManager.OpenWebConfiguration("~"); AppSettingsSection app = config.AppSettings; app.Settings[key].Value =value; config.Save(ConfigurationSaveMode.Modified); } ``` ## 用法 ``` ConfigHelper.SetAppSetting("website", "http://www.ynicp1.com");//注意節點website需要手動添加 因為安全的原因自動添加節點會報錯 ``` ## 效果 ``` <appSettings> <add key="dbname" value="bpm" /> <add key="host" value="" /> <add key="useEncrypt" value="false" /> <add key="systemName" value="精準扶貧" /> <add key="copyRight" value="精準扶貧" /> <add key="website" value="http://www.ynicp1.com" /> <add key="showValidateCode" value="false" /> <add key="CombresSectionName" value="combres" /> </appSettings> ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看