解讀SiteFactory修改成GB2312的編碼_動易Cms教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!

      問題:SiteFactory是否可以修改成GB2312的編碼?

      方法:答案是可以的,可以支持配置編碼輸出,找到根目錄下的web.config,找到““<system.web>”,下面增加紅色配置:

      <system.web>
            <globalization  requestEncoding="GB2312" responseEncoding="GB2312" fileEncoding="GB2312" />

      ....................其它配置
      </system.web>

      以上為配置整站為GB2312編碼。
       

      如果是單獨讓某一頁面支持GB2312,如,打印頁面需要的是GB2312編碼,那么就可以加上下面紅色帶的配置:

      <configuration>
      <location path="Print.aspx">
          <system.web>
            <globalization  requestEncoding="GB2312" responseEncoding="GB2312" fileEncoding="GB2312" />
          </system.web>
        </location>
      ....................其它配置
      </configuration>


      附:這里“ <location path="Print.aspx">”,path就是頁面路徑或文件夾路徑。

      查看更多 動易Cms教程  動易Cms模板

      來源:模板無憂//所屬分類:動易Cms教程/更新時間:2009-07-17
      相關動易Cms教程