zoukankan      html  css  js  c++  java
  • ASP.NET应用程序

    Web应用程序

    ASP.NET Web

    应用程序大部分是ASP.NET Web开发中创建的应用程序类型,也就是ASP.NET Web窗体应用程序。最简单的ASP.NET Web应用程序包括一个目录,可以通过IIS服务器使用HTTP协议在浏览器上呈现。它至少包括一个.aspx文件,即ASP.NET页。

    Web服务器

      

    Web服务器是ASP.NET提供的另一种应用程序类型。

      

    Web服务器的基本结构是遵照SOAP、XML和WSDL等行业标准生成的,这使得其他平台的客户端可以和Web服务进行交互操作。

    应用程序结构

    一般情况下,

    ASP.NET应用程序可能有如下文件:

          

    Web窗体页(.aspx文件);

          

    Web服务(.asmx文件);

          

    代码隐藏文件;

          

    配置文件(web.config文件);

          

    Global.asax文件;

          

    用户控件文件(.ascx文件);

          

    其他组件。

    ASP.NET Web窗体

    Web

    窗体结构代码

    <html xmlns = “

    http://www   ”>

    <head runat = “server”>

    <title>

    无标题页 <title>

    </head>

    <body>

        

    <form id = “form1” runat = “server”>

             

    <div>

                                        

    <asp: Label ID = “Label1” runat = “server”  Text = “Label”></asp: Label>

                      

           <asp: Button ID = “Button1” runat = “server”  Onclick = “Button1_Click”

    Text = “Button”/>

    </div>

    </form>

    </body>

    </html>

    ASP.NET Web

    窗体页一般包含如下的元素:

    1)@指令。ASP.NET中用作处理页面的指令。最常用的指令为@Page指令,如:

    <%@ Page Language = “C#” %>

      

    (2)服务器代码。包含在<script></script>标记之间,由变量、成员声明及代码构成的块。

       (3)<form>元素。

    <form id = “form1” runat = “server”>

             <asp: Label ID = “Label1” runat = “server”  Text = “Label”></asp: Label>

        <asp: Button ID = “Button1” runat = “server”  Onclick = “Button1_Click”  Text = “Button”/>

    </form>

       (4)静态文本。

    Name:<input type = “text” id = “txtName”>

       (5)Web服务器控件。

    <asp:TextBox id = “Mytext” runat = “server”/>

       (6)HTML元素作为服务器控件。

    <input type = “text” id = “MyText” runat = “server”>

  • 相关阅读:
    11.json
    10.正则表达式
    9.面向对象、类
    bzoj 2878: [Noi2012]迷失游乐园
    bzoj 2727: [HNOI2012]双十字
    bzoj 3224: Tyvj 1728 普通平衡树
    bzoj 3932: [CQOI2015]任务查询系统
    bzoj 1997: [Hnoi2010]Planar
    4 Django简介
    3 web框架
  • 原文地址:https://www.cnblogs.com/momi/p/2404098.html
Copyright © 2011-2022 走看看