星空网 > 软件开发 > ASP.net

EXT.NET学习笔记(一) 下载配置使用

新公司使用ext.net开发,开始学习该知识:

 

首先下载ext.net,目前我使用的版本为1.7,该版本免费,基本的功能也够用,使用ext.net进行开发时强烈建议使用VS2015,能便捷的提示,大大的缩短学习和使用时间。

ext.net共包含三个文件:

EXT.NET学习笔记(一) 下载配置使用

下载后在工程中将其三个引用。

ext.net官方提供完整的API,详见该地址:http://examples1.ext.net

详细的学习资料参见该博主文章:齐飞 http://youring2.cnblogs.com/

 

 

以下是我的个人心得:

首先在web.config中<configuration>添加以下

EXT.NET学习笔记(一) 下载配置使用EXT.NET学习笔记(一) 下载配置使用
<!--添加全局配置--> <configSections>  <section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" /> </configSections>  <extnet scriptMode="Release" /> <system.web>  <!--    The following system.web section is only requited for running ASP.NET AJAX under Internet    Information Services 6.0 (or earlier). This section is not necessary for IIS 7.0 or later. 经典模式  -->  <compilation debug="true" targetFramework="4.0" />  <httpHandlers>   <add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />  </httpHandlers>  <httpModules>   <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />  </httpModules>  <!--在页面中使用Ext.Net的控件,需要添加针对Ext.Net控件的配置   在这里配置后就不需要在每个aspx页面页首都添加配置   <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %> -->  <pages>   <controls>    <add tagPrefix="ext" namespace="Ext.Net" assembly="Ext.Net" />   </controls>  </pages> </system.web> <system.webServer>  <!--经典模式和集成模式共存,还需要再system.webServer节点中添加下面的配置-->  <validation validateIntegratedModeConfiguration="false" />  <!--    The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0.    It is not necessary for previous version of IIS. 集成模式  -->  <modules>   <add        name="DirectRequestModule"        preCondition="managedHandler"        type="Ext.Net.DirectRequestModule, Ext.Net" />  </modules>  <handlers>   <add        name="DirectRequestHandler"        verb="*"        path="*/ext.axd"        preCondition="integratedMode"        type="Ext.Net.ResourceHandler" />  </handlers> </system.webServer>

View Code

 

然后可以开始在页面中使用ext.net了。

在需要使用Ext.Net控件的页面中添加资源引用,就像使用ScriptManager一样,需要在页面中添加如下控件,

 <ext:ResourceManager runat="server"></ext:ResourceManager>

有了这个控件,就等于我们已经在页面中添加了ExtJS的引用。

然后添加如下代码 

<ext:Window runat="server"   ID="firstwin"   Title="示例窗口"   Width="300"   Height="200"   AutoShow="true"></ext:Window>

在IE中查看该页面,就能看到一个窗体了。

 

if (!X.IsAjaxRequest)

当第一次请求页面时(此时为回发),IsAjaxRequest 为 false,之后为 true,因为之后的请求是 Ajax 请求。




原标题:EXT.NET学习笔记(一) 下载配置使用

关键词:.NET

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

外贸依存度:https://www.goluckyvip.com/tag/43091.html
外贸阴阳鱼:https://www.goluckyvip.com/tag/43092.html
外贸英文seo:https://www.goluckyvip.com/tag/43093.html
外贸英语词汇:https://www.goluckyvip.com/tag/43094.html
外贸营销网站:https://www.goluckyvip.com/tag/43096.html
外贸营销型网站:https://www.goluckyvip.com/tag/43097.html
深圳有没有比较好玩的景点 深圳有没有比较好玩的景点推荐一下:https://www.vstour.cn/a/366175.html
长治婚庆女司仪和主持人:https://www.vstour.cn/a/366176.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流