转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 站长学院 >> Web开发 >> 正文
今天写了第一个ASP.NET程序         ★★★★

今天写了第一个ASP.NET程序

作者:闵涛 文章来源:闵涛的学习笔记 点击数:2459 更新时间:2009/4/23 10:47:10

照葫芦画瓢,写了一个ASP.NET的程序,取名叫frist.aspx吧,权当我的第一个ASP.NET的程序吧。全部程序如下:

<Script Language="vb" Runat="Server">
  Sub myButton_Click(sender As Object, e As EventArgs)
    myLabel.Text = "非常高兴,恭喜您" & myTextBox.Text & ",您的第一个ASP.NET的程序运行完全正
常"
  End Sub
</Script>

<Html>
    <Body>

        <Form Runat = "Server">
           请输入您的姓名:
         <ASP:TextBox Runat = "server" Id="myTextBox"/>
         <ASP:Button Runat = "Server" Id="myButton" Text="确定" OnClick="myButton_Click"/>
        <br><br>
        <ASP:Label Runat = "Server" Id="myLabel"/>
        </Form>
    </Body>
</Html>

这个程序运行非常成功,哈哈,有点开心,但是想想,他的运行原理是什么?看看他的编译源:

行 1:    ''''------------------------------------------------------------------------------
行 2:    '''' <autogenerated>
行 3:    ''''     This code was generated by a tool.
行 4:    ''''     Runtime Version: 1.1.4322.573
行 5:    ''''
行 6:    ''''     Changes to this file may cause incorrect behavior and will be lost if
行 7:    ''''     the code is regenerated.
行 8:    '''' </autogenerated>
行 9:    ''''------------------------------------------------------------------------------
行 10:  
行 11:   Option Strict Off
行 12:   Option Explicit On
行 13:  
行 14:   Imports Microsoft.VisualBasic
行 15:   Imports System
行 16:   Imports System.Collections
行 17:   Imports System.Collections.Specialized
行 18:   Imports System.Configuration
行 19:   Imports System.Text
行 20:   Imports System.Text.RegularExpressions
行 21:   Imports System.Web
行 22:   Imports System.Web.Caching
行 23:   Imports System.Web.Security
行 24:   Imports System.Web.SessionState
行 25:   Imports System.Web.UI
行 26:   Imports System.Web.UI.HtmlControls
行 27:   Imports System.Web.UI.WebControls
行 28:  
行 29:   Namespace ASP
行 30:      
行 31:       Public Class frist_aspx
行 32:           Inherits System.Web.UI.Page
行 33:           Implements System.Web.SessionState.IRequiresSessionState
行 34:          
行 35:           Private Shared __autoHandlers As Integer
行 36:          
行 37:          
行 38:           #ExternalSource("D:\works\study\学习ASP.NET\frist.aspx",12)
行 39:           Protected myTextBox As System.Web.UI.WebControls.TextBox
行 40:          
行 41:           #End ExternalSource
行 42:          
行 43:          
行 44:           #ExternalSource("D:\works\study\学习ASP.NET\frist.aspx",13)
行 45:           Protected myButton As System.Web.UI.WebControls.Button
行 46:          
行 47:           #End ExternalSource
行 48:          
行 49:          
行 50:           #ExternalSource("D:\works\study\学习ASP.NET\frist.aspx",15)
行 51:           Protected myLabel As System.Web.UI.WebControls.Label
行 52:          
行 53:           #End ExternalSource
行 54:          
行 55:          
行 56:           #ExternalSource("D:\works\study\学习ASP.NET\frist.aspx",10)
行 57:           Private __control2 As System.Web.UI.HtmlControls.HtmlForm
行 58:          
行 59:           #End ExternalSource
行 60:          
行 61:           Private Shared __initialized As Boolean = false
行 62:          
行 63:           Private Shared __fileDependencies As System.Collections.ArrayList
行 64:          
行 65:          
行 66:           #ExternalSource("D:\works\study\学习ASP.NET\frist.aspx",1)
行 67:          
行 68:     Sub myButton_Click(sender As Object, e As EventArgs)
行 69:       myLabel.Text = "非常高兴,恭喜您" & myTextBox.Text & ",您的第一个ASP.NET的程序运行完全正常"
行 70:     End Sub
行 71:  
行 72:           #End ExternalSource
行 73:          
行 74:           Public Sub New()
行 75:               MyBase.New
行 76:               Dim dependencies As System.Collections.ArrayList
行 77:               If (ASP.frist_aspx.__initialized = false) Then
行 78:                   dependencies = New System.Collections.ArrayList
行 79:                   dependencies.Add("D:\works\study\学习ASP.NET\frist.aspx")
行 80:                   ASP.frist_aspx.__fileDependencies = dependencies
行 81:                   ASP.frist_aspx.__initialized = true
行 82:               End If
行 83:           End Sub
行 84:          
行 85:           Protected Overrides Property AutoHandlers As Integer
行 86:               Get
行 87:                   Return ASP.frist_aspx.__autoHandlers
行 88:               End Get
行 89:               Set
行 90:                   ASP.frist_aspx.__autoHandlers = value
行 91:               End Set
行 92:           End Property
行 93:          
行 94:           Protected ReadOnly Property ApplicationInstance As System.Web.HttpApplication
行 95:               Get
行 96:                   Return CType(Me.Context.ApplicationInstance,System.Web.HttpApplication)
行 97:               End Get
行 98:&nbs

[1] [2] [3]  下一页


[C语言系列]NET 中C#的switch语句的语法  [系统软件]托拽Explore中的文件到VB.net的窗口
[系统软件]Boost库在XP+Visual C++.net中的安装  [常用软件]新配色面板:Paint.Net3.0RC1官方下载
[常用软件]用内建的“Net Meeting”聊天  [VB.NET程序]Henry的VB.NET之旅(三)—共享成员
[VB.NET程序]Henry的VB.NET之旅(二)—构造与析构  [VB.NET程序]Henry的VB.NET之旅(一)—失踪的窗体
[VB.NET程序]在托盘上显示Balloon Tooltip(VB.NET)  [VB.NET程序]Henry手记-VB.NET中动态加载Treeview节点(二)
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Web开发  · 网页制作
    · 平面设计  · 网站运营
    · 网站推广  · 搜索优化
    · 建站心得  · 站长故事
    · 互联动态
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台