zoukankan      html  css  js  c++  java
  • 如何在VS2010中编写ExtJs

    在vs2010的工程,在工具栏里添加新的选项卡,把Dll拖到上面并没有出现extjs工具按钮。
    现在把手动添加extjs介绍如下:

    首先,要在工程里面添加对一下三个dll的引用,这里用的是ext3.0。
    Ext.Net.dll
    Ext.Net.Utilities.dll
    Newtonsoft.Json.dll

    其次,在webconfig添加配置项
    <system.web>
        <httpHandlers>
          <add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler"
            validate="false" />
        </httpHandlers>
     </system.web>

    配置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>



    再者,在aspx页面中添加
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonitorInfo.aspx.cs" Inherits="DCMWeb.MonitorInfo" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>

     
    网页代码
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
      <style type="text/css">
        html, body {
         height: 100%;
         overflow:hidden;
        }
        body {
         padding: 0;
         margin: 0;
        }
        </style>
    </head>
    <body >

        <form id="form1" runat="server"  style="height:100%; 100%; margin:0; padding:0; ">
        <ext:ResourceManager runat="server" />
        <ext:Viewport runat="server" Layout="border">
            <Items>
                <ext:Panel runat="server" Region="Center" BodyBorder="false" Border="false">
                <Content>
                          </Content>
                </ext:Panel>
                <ext:Panel
                    runat="server"
                    BodyBorder="false"
                     Border="false"
                    Region="South"
                    Split="false"
                    Collapsible="false"
                    Height="30"
                    Padding="0"
                    >
                    <Content>
                   </Content>
                     </ext:Panel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>

    红色部分代码是必须要添加的部分,这样就可以写自己的代码啦

  • 相关阅读:
    vue -resource 文件提交提示process,或者拦截处理
    利用vue写一个复选框的组件
    webpack处理媒体文件(图片/视频和音频)
    函数——惰性函数
    函数——函数的节流与防抖
    函数——箭头函数&自执行函数(二)
    js重点——作用域——作用域分类及变量提升
    js重点——作用域——内部原理
    js之数据类型(对象类型——单体内置对象——JSON)
    js之数据类型(对象类型——单体内置对象——Math)
  • 原文地址:https://www.cnblogs.com/jianglan/p/2123495.html
Copyright © 2011-2022 走看看