在开发项目之前请配置好 Web.config:
  1. 设置 configuration 配置节:
        <configSections>
            <section name="FineUI" type="FineUI.ConfigSection, FineUI"/>
        </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" JSBasePath="~/extjs" -->
        <FineUI DebugMode="false" />
                
    FineUI 配置节中的参数:


  2. 设置 system.web 配置节:
        <pages>
          <controls>
            <add assembly="FineUI" namespace="FineUI" tagPrefix="f"/>
          </controls>
        </pages>
        
        <httpModules>
          <add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
        </httpModules>
    
            
  3. 完成。

特别提醒

基于.Net 4.5的项目,一定要为Web.config中<page>标签添加controlRenderingCompatibilityVersion和clientIDMode两个属性。
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
        <controls>
        <add assembly="FineUI" namespace="FineUI" tagPrefix="f" />
        </controls>
    </pages>
    

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

FineUI.dll只有一个版本,无论你的项目是2.0、3.5、4.0、4.5,都只需要引用同一个FineUI.dll即可。

Newtonsoft.Json.dll为每个.Net版本创建不同的DLL,比如你的项目是基于.Net 2.0的,就要引用json.net\Net20\Newtonsoft.Json.dll,如果你的项目是基于.Net 4.0的,就要引用json.net\Net40\Newtonsoft.Json.dll。