• ExtASPNet web.config


    【转CSDN】:http://download.csdn.net/download/mcqq123321/4607708

    修改 Web.config

    打开 web.config,在 configuration 配置节:

    <configSections>
    <section name="ExtAspNet" type="ExtAspNet.ConfigSection, ExtAspNet"/>
    </configSections>

    <!-- 可用的配置项(这里列的都是默认值):Language="zh_CN" AjaxTimeout="60" EnableAjax="true" Theme="blue" FormMessageTarget="qtip" FormOffsetRight="20" FormLabelWidth="100" FormLabelSeparator=":" IconBasePath="~/icon" EnableAjaxLoading="true" AjaxLoadingType="default" CustomTheme="" CustomThemeBasePath="~/theme" -->
    <ExtAspNet EnableBigFont="true" DebugMode="false" />

    ExtAspNet 配置节中的参数:
    Theme: 控件主题,目前内置了三种主题风格(blue/gray/access,默认值:blue)
    Language: 控件语言(en/zh_CN/zh_TW/...,默认值:zh_CN)
    FormMessageTarget: 表单字段错误提示信息的显示位置(side/qtip,默认值:side)
    FormOffsetRight: 表单字段右侧距离边界的宽度(默认值:20px)
    FormLabelWidth: 表单字段标签的宽度(默认值:100px)
    FormLabelSeparator: 表单字段标签与内容的分隔符(默认值:":")
    EnableAjax: 是否启用AJAX(默认值:true)
    AjaxTimeout: AJAX超时时间(单位:秒,默认值:60s)
    EnableBigFont: 是否启用大字体,将ExtJS默认11px的字体全部改为12px,否则显示的中文字体太小(默认值:false)
    DebugMode: 是否开发模式,启用时格式化输出页面JavaScript代码,便于调试(默认值:false)
    EnableAjaxLoading: 是否启用Ajax提示(默认值:true)
    AjaxLoadingType: Ajax提示类型,默认在页面顶部显示黄色提示框,mask则显示extjs默认的加载提示(default/mask,默认值:default)


    在 system.web 配置节:

    <pages>
    <controls>
    <add assembly="ExtAspNet" namespace="ExtAspNet" tagPrefix="ext"/>
    </controls>
    </pages>

    <httpModules>
    <add name="ExtAspNetScriptModule" type="ExtAspNet.ScriptModule, ExtAspNet"/>
    </httpModules>

    <httpHandlers>
    <add verb="GET" path="res.axd" type="ExtAspNet.ResourceHandler, ExtAspNet"/>
    </httpHandlers>

    完成。


    特别提醒

    基于.Net 4.0的项目,一定要为Web.config中<page>标签添加controlRenderingCompatibilityVersion和clientIDMode两个属性。

    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
    <controls>
    <add assembly="ExtAspNet" namespace="ExtAspNet" tagPrefix="ext" />
    </controls>
    </pages>


    特别注意引用的Newtonsoft.Json.dll版本

    ExtAspNet.dll只有一个For Net2.0的版本,无论你的项目是2.0、3.5、4.0,都只需要引用同一个ExtAspNet.dll即可。
    而Newtonsoft.Json.dll为在每个DotNet下都有自己的版本,比如你的项目是基于.Net 2.0的,就要引用json.netNet20Newtonsoft.Json.dll,如果你的项目是基于.Net 4.0的,就要引用json.netNet40Newtonsoft.Json.dl。

    附录上刚才测试通过的web.config文件

    <?xml version="1.0"?>
    
    <configuration>
      <configSections>
        <section name="ExtAspNet" type="ExtAspNet.ConfigSection, ExtAspNet" requirePermission="false"/>
      </configSections>
    
      <ExtAspNet EnableBigFont="true" DebugMode="false" />
    
      <appSettings/>
      <connectionStrings/>
    
      <system.web>
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
          <controls>
            <add namespace="FrameWork.WebControls" assembly="FrameWork" tagPrefix="FrameWorkWebControls"/>
            <add assembly="ExtAspNet" namespace="ExtAspNet" tagPrefix="ext"/>
          </controls>
        </pages>
        <httpModules>
          <add name="ExtAspNetScriptModule" type="ExtAspNet.ScriptModule, ExtAspNet"/>
        </httpModules>
        <httpHandlers>
          <add verb="GET" path="res.axd" type="ExtAspNet.ResourceHandler, ExtAspNet"/>
        </httpHandlers>
        <httpRuntime maxRequestLength="102400 "/>
        <customErrors mode="Off"/>
        <compilation debug="true" targetFramework="4.0"/>
    
      </system.web>
    
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>
    </configuration>
    

      

  • 相关阅读:
    macOS 修改键盘重复按键延迟
    stdout 与 stderr 区别
    E. 1-Trees and Queries
    Codeforces Round #615 (Div. 3)
    Codeforces Round 613(div 2)
    Codeforces Edu80
    SPOJ
    快读
    《货车运输》题解--最大生成树&倍增
    倍增思想求lca
  • 原文地址:https://www.cnblogs.com/bingzisky/p/3145855.html
Copyright © 2020-2023  润新知