182 lines
6.7 KiB
HTML
182 lines
6.7 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<title></title>
|
||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||
<style type="text/css">
|
||
body {
|
||
font-size: 13px;
|
||
}
|
||
|
||
ul li {
|
||
margin-bottom: 5px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body class="f-body">
|
||
<div>
|
||
在开发项目之前请配置好 Web.config:
|
||
</div>
|
||
<ol>
|
||
<li><strong>设置 configuration 配置节:</strong>
|
||
<br />
|
||
<pre>
|
||
<configSections>
|
||
<section name="FineUI" type="FineUI.ConfigSection, FineUI"/>
|
||
</configSections>
|
||
|
||
<!-- 可用的配置项(这里列的都是默认值):
|
||
Theme="Neptune"
|
||
Language="zh_CN"
|
||
AjaxTimeout="120"
|
||
EnableAjax="true"
|
||
DebugMode="false"
|
||
FormMessageTarget="Qtip"
|
||
FormOffsetRight="0"
|
||
FormLabelWidth="100"
|
||
FormLabelSeparator=":"
|
||
FormLabelAlign="Left"
|
||
EnableAjaxLoading="true"
|
||
AjaxLoadingType="Default"
|
||
CustomTheme=""
|
||
IconBasePath="~/res/icon"
|
||
CustomThemeBasePath="~/res/theme"
|
||
JSBasePath="~/extjs"
|
||
IEEdge="true"
|
||
-->
|
||
<FineUI DebugMode="false" />
|
||
</pre>
|
||
FineUI 配置节中的参数:
|
||
<br />
|
||
<ul>
|
||
<li>Theme: 控件主题,内置 4 种主题风格(Neptune/Blue/Gray/Access,默认值:Neptune)</li>
|
||
<li>Language: 控件语言(en/zh_CN/zh_TW,默认值:zh_CN)</li>
|
||
<li>FormMessageTarget: 表单字段错误提示信息的显示位置(Title/Side/Qtip,默认值:Side)</li>
|
||
<li>FormOffsetRight: 表单字段右侧距离边界的宽度(默认值:0px)</li>
|
||
<li>FormLabelWidth: 表单字段标签的宽度(默认值:100px)</li>
|
||
<li>FormLabelSeparator: 表单字段标签与内容的分隔符(默认值:":")</li>
|
||
<li>EnableAjax: 是否启用AJAX(默认值:true)</li>
|
||
<li>AjaxTimeout: Ajax超时时间(单位:秒,默认值:120s)</li>
|
||
<li>DebugMode: 是否开发模式,启用时格式化输出页面的JavaScript代码,便于调试(默认值:false)</li>
|
||
<li>EnableAjaxLoading: 是否启用Ajax提示(默认值:true)</li>
|
||
<li>AjaxLoadingType: Ajax提示类型,默认在页面顶部显示黄色提示框(Default/Mask,默认值:Default)</li>
|
||
</ul>
|
||
<br />
|
||
<br />
|
||
</li>
|
||
<li><strong>设置 system.web 配置节:</strong>
|
||
<pre>
|
||
<system.web>
|
||
<pages>
|
||
<controls>
|
||
<add assembly="FineUI" namespace="FineUI" tagPrefix="f"/>
|
||
</controls>
|
||
</pages>
|
||
|
||
<httpModules>
|
||
<add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
|
||
</httpModules>
|
||
|
||
<httpHandlers>
|
||
<add verb="GET" path="res.axd" type="FineUI.ResourceHandler, FineUI" validate="false"/>
|
||
</httpHandlers>
|
||
<system.web>
|
||
</pre>
|
||
</li>
|
||
<li><strong>完成。</strong></li>
|
||
</ol>
|
||
<br />
|
||
<div style="font-weight: bold; color: Red;">
|
||
常见问题:
|
||
</div>
|
||
<ul>
|
||
<li>
|
||
<strong>Net4.0以上的项目,一定要为Web.config中<page>标签添加controlRenderingCompatibilityVersion和clientIDMode两个属性。
|
||
</strong>
|
||
<pre>
|
||
<pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID">
|
||
<controls>
|
||
<add assembly="FineUI" namespace="FineUI" tagPrefix="f" />
|
||
</controls>
|
||
</pages>
|
||
</pre>
|
||
<br />
|
||
</li>
|
||
<li>
|
||
<strong>IIS集成模式(VS2013、VS2015的默认设置)</strong>
|
||
<br />
|
||
<br />
|
||
需要将 httpModules 和 httpHandlers 从 system.web 中删除,并添加到 system.webServer 中,如下所示:
|
||
<pre>
|
||
<system.webServer>
|
||
<modules>
|
||
<add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
|
||
</modules>
|
||
<handlers>
|
||
<add name="FineUIResourceHandler" verb="GET" path="res.axd" type="FineUI.ResourceHandler, FineUI"/>
|
||
</handlers>
|
||
</system.webServer>
|
||
</pre>
|
||
你也可以直接将官网示例源代码中的 Web.config_for_VS2013 改名为 Web.config 使用。
|
||
<br />
|
||
<br />
|
||
</li>
|
||
<li>
|
||
<strong>如果项目中使用了表单认证,需要添加 res.axd 的例外</strong>
|
||
<br />
|
||
<br />
|
||
如果在 system.web 下有类似如下的表单验证配置:
|
||
<pre>
|
||
<system.web>
|
||
<authentication mode="Forms">
|
||
<forms name=".ASPXFORMSAUTH" loginUrl="~/default.aspx" timeout="120" defaultUrl="~/main.aspx" protection="All" path="/"/>
|
||
</authentication>
|
||
<authorization>
|
||
<deny users="?"/>
|
||
</authorization>
|
||
</system.web></pre>
|
||
<br />
|
||
则需要添加 res.axd 例外,否则所有的图标字体都显示不了:
|
||
<pre>
|
||
</system.web>
|
||
|
||
<location path="res.axd">
|
||
<system.web>
|
||
<authorization>
|
||
<allow users ="*" />
|
||
</authorization>
|
||
</system.web>
|
||
</location></pre>
|
||
<br />
|
||
</li>
|
||
<li>
|
||
<strong>注意引用的Newtonsoft.Json.dll版本
|
||
</strong>
|
||
<br />
|
||
<br />
|
||
FineUI.dll只有一个版本,无论你的项目是2.0、3.5、4.0、4.5,都只需要引用同一个FineUI.dll即可。
|
||
<br />
|
||
<br />
|
||
Newtonsoft.Json.dll在不同的NET版本有不同的DLL,建议您使用Visual Studio的NuGet工具下载最新的JSON库:
|
||
<br />
|
||
<br />
|
||
<img src="../res/images/json.net.1.png" alt="Json.NET" />
|
||
<br />
|
||
<br />
|
||
<img src="../res/images/json.net.2.png" alt="Json.NET" />
|
||
<br />
|
||
</li>
|
||
</ul>
|
||
|
||
<hr />
|
||
<br />
|
||
<div style="font-weight: bold; color: Red;">
|
||
更多常见问题:<a href="http://fineui.com/bbs/forum.php?mod=viewthread&tid=655" target="_blank">http://fineui.com/bbs/forum.php?mod=viewthread&tid=655</a>
|
||
</div>
|
||
<br />
|
||
<br />
|
||
<br />
|
||
<br />
|
||
</body>
|
||
</html>
|