Ext.NET+ASP.NET MVC如何配置

一、开发环境

VS2010+SQL  Server 2008

二、Ext.NET安装配置

1.首先从http://www.ext.net/download/下载Ext.NET,有Ext.NET Pro 2.1和Ext.NET Pro 1.6两个版本,其中2.1中WebForms和MVC进行了分开,而1.6写的是WebForms的,但它实际上是支持MVC的,并且只有它里面才含有Ext.Net.MVC.dll这个库,所以这里我们下载1.6版的,得到文件

Ext.Net.dll
Ext.Net.MVC.dll
Ext.Net.Utilities.dll
Newtonsoft.Json.dll

2.打开VS2010,文件->新建项目->Web->ASP.NET MVC 2 Web 应用程序,然后将上面下载下来的4个文件复制到解决方案资源管理器的Content目录下,并将它们添加进项目,然后再在引用中添加引用->浏览,找到Content目录下的

Ext.Net.dll
Ext.Net.MVC.dll

文件引用到项目里面。

3.首次使用时

  • 在工具箱中右键点击"添加选项卡"
  • 选项卡名称Ext
  • 在该选项卡中,右键点击“选择项”
  • 弹出"选择箱项"对话框,点击“浏览” ,双击选择下载文件目录下的"Ext.Net.dll"
  • 点击“确定”,将在Ext选项卡中出现多个控件

4.配置Web.Config

<? xml version="1.0" encoding="utf-8" ?>
< configuration >
< configSections >
< section name ="extnet" type ="Ext.Net.GlobalConfig" requirePermission ="false" />
< configSections >
< extnet scriptMode="Release"  />
<!--
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 >
<pages>
   <controls>
    <add assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext" />
   </controls>
  </pages>
</ 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 >

5.页面<form>中添加:

  
  
<!-- 必须的 --> < ext:ResourceManager ID = " ResourceManager1 " runat = " server " />
6.拖入一个Ext控件到页面。

7.编译运行

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值