Ext.net is an open source Web control based on the cross-browser ExtJS library and the. NET framework that supports ASP., including a rich Ajax application, formerly known as Coolite.
:http://www.ext.net/download/
Example address:http://examples.ext.net/
1. First download ext.net, address:http://www.ext.net/download/, there are two kinds of frame selection, select Download WebForms
The current version is 2.5.1, and the compressed package contains different versions, which are used in the corresponding. NET version of the program.
2. Referencing DLL files in the project
To use Ext.net, first create a WebForm program, we use version 4.0 here.
In the reference manager, browse to the extracted directory, and then add the following reference (unzipped, after \ext.net.webforms.pro.2.5.1.examples.explorer\examples explorer\ Ext.net.examples\build\referenceassemblies\ folder can be found):
3. Configure the Web. config
Despite the addition of references, this is not yet complete. To use ext.net correctly, you also need to configure the Web. config.
The first step is to add the configuration of the HttpHandler and HttpModule nodes
Classic Mode configuration:
<httphandlers> <AddPath= "*/ext.axd"verb="*"type= "Ext.Net.ResourceHandler"Validate= "false" /></httphandlers><httpmodules> <Addname= "Directrequestmodule"type= "Ext.Net.DirectRequestModule, ext.net" /></httpmodules>
Integrated Mode configuration:
<Modules> <Addname= "Directrequestmodule"Precondition= "Managedhandler"type= "Ext.Net.DirectRequestModule, ext.net" /></Modules><handlers> <Addname= "Directrequesthandler"verb="*"Path= "*/ext.axd"Precondition= "Integratedmode"type= "Ext.Net.ResourceHandler" /></handlers>
To coexist with Classic mode and integrated mode, you will also need to add the following configuration to the System.webserver node:
<validateintegratedmodeconfiguration= "false"/>
Step two, configure the page control
To use ext.net controls in a page, you need to add a configuration for the Ext.net control:
<pages> <Controls> <AddTagPrefix= "ext"namespace= "Ext.net"Assembly= "Ext.net"/> </Controls></pages>
3. Add ext.net Global Configuration node
After completing the two steps above, we can already use the Ext.net control in the page.
So why do we have a third-step configuration? The third step configuration adds a global configuration, for example we want to use global skins instead of every page to set.
To add a global configuration, you first add a custom node to the configuration file:
< configsections > < name= "extnet" type= "Ext.Net.GlobalConfig" requirepermission = "false"/></configsections>
Next is the configuration item:
<theme= "Neptune"/>
Here we only set the global skin, using ExtJS in the Neptune skin, the effect is as follows:
Do not set this to use the default skin, the effect is as follows:
4. Simple usage in the page
Once the configuration is complete, we can use the Ext.net control in the page.
First, add a resource reference to the page where you want to use the Ext.net control, just as you would with ScriptManager, by adding the following controls to the page:
<runat= "Server"></ext:resourcemanager>
With this control, we have added a ExtJS reference to the page.
Let's take a look at the code in the example window above:
<runat= "Server" ID= "Win" Title= "Sample window " Width=" Height= " autoshow " = "true" > </ Ext:window >
Then run the page and you can see the example window we just had.
If you know something about ExtJS, then you will find that ext.net to a great extent simulates ExtJS's writing, greatly improving our productivity.
PS: Questions about Ext.net Copyright
Ext.net is an open source project, there are charge and free licensing two, there is basically no difference between two versions, we can learn to use the free license, if the need for commercial authorization, can go to the official website to buy a set, the Authorized version contains the EXTJS authorization, You can check the respective authorized prices on the Ext.net website.
Source:ext.net Learn note 01: Using Ext.net in ASP. NET WebForm