技术开发 频道

Ext.Net系列:安装与使用

5.配置Web.Config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false"/>
<configSections>
<extnet />
<!--
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.
-->
<system.web>
<httpHandlers>
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false"/>
</httpHandlers>
<httpModules>
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net"/>
</httpModules>
</system.web>

<!--
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.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<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>
</configuration>

  6.打开default.aspx。顶部添加:

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

  7.页面<form>中添加:

<!-- 必须的-->
<ext:ResourceManager ID="ResourceManager1" runat="server" />

  8.拖入一个Ext控件到页面。如

<ext:CycleButton ID="CycleButton1" runat="server" ShowText="true" PrependText="View As ">
<Menu>
<ext:Menu ID="Menu1" runat="server">
<Items>
<ext:CheckMenuItem ID="CheckMenuItem1" runat="server" Text="Text Only" Icon="Note" />
<ext:CheckMenuItem ID="CheckMenuItem2" runat="server" Text="Html" Icon="Html" Checked="true" />
</Items>
</ext:Menu>
</Menu>
</ext:CycleButton>

 9.页面点击右键“在浏览器中查看”

 从此你爱上了Ext.net。。。

0
相关文章