My first asp.net program.

Source: Internet
Author: User
Asp.net| Program

First of all, to prepare their own environment, to be able to run the ASPX program.


Save the following paragraph as a hello.aspx


<%@ Page language= "vb" src= "Hellocodebehindvb.vb" inherits= "HELLOWEBFORMVB"%>

<HTML>

<HEAD>

<title> My first asp.net program </title>

</HEAD>

<body>

Use the first small program written by VB.net to celebrate. <P><P>

<form runat= "Server" id= "Form1" >

<asp:button runat= "Server" text= "click" id= "Button1"/>

<p>

<asp:label runat= "Server" text= "" id= "Thelabel"/>

</form>

</body>

</HTML>




Save the following paragraph as a file Hellocodebehindvb.vb




Public Class HELLOWEBFORMVB

Inherits System.Web.UI.Page

Protected WithEvents Button1 as System.Web.UI.WebControls.Button

Protected Thelabel as System.Web.UI.WebControls.Label

Private Sub button1_click (ByVal sender as Object, ByVal e as System.EventArgs) Handles Button1.Click

Thelabel.text = "Hello, I am the CI qin strong, see?" ^o^ <p> "+button1.text+" <p> "+thelabel.text

End Sub




Private Sub Page_Load (ByVal sender as System.Object, ByVal e as System.EventArgs) Handles MyBase.Load

' The user code to place the initialization page here

Thelabel.text = "<a href=http://blog.csdn.net/cqq>http://blog.csdn.net/cqq</a>"

End Sub

End Class



And then run hello.aspx on it.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.