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>

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

  • 相关阅读:
    Unity热更新04-XLua调用C#-01-Lua调用C#类
    Unity热更新03-C#调用XLua-010-LuaMgr
    Unity热更新03-C#调用XLua-09-Lua表映射到 XLua的LuaTable中(不建议)
    Unity热更新03-C#调用XLua-07-Lua表映射到C#接口
    Unity热更新03-C#调用XLua-07-Lua表映射到C#类
    C# 禁用控制台应用程序关闭按钮
    只允许输入正整数、负数、 控制小数点不能是第一位,负号必须第一位
    Godot
    GameFramework摘录
    GameFramework摘录
  • 原文地址:https://www.cnblogs.com/jianglan/p/2123495.html
Copyright © 2011-2022 走看看