Compilation, compilation, and release of Asp.net 2.0 tutorials

Source: Internet
Author: User

Respect the author. Keep the words www.it55.com.

 

In the previous section, we created the first Asp.net 2.0 application. After the application is created, vs automatically generates a default. aspx page.
Next we will use this default. ASPX page to start our Asp.net development journey.
Switch default. asp to the design window (click "design" at the bottom of the page "),

Drag the textbox in the toolbox to the page,

Right-click the "attribute" menu and change its ID to input,




Similarly, we drag a button and name its ID btok, and change its text value to "OK ",


Double-click "OK". vs opens the default. aspx background program file default. aspx. CS for us,

We can see that there is a page_load function, which handles page loading events; the other is the btok_click event, which is the event processing function triggered by the click event of our "OK" button.
In this function, we can write the statements we need to meet our program requirements. For example, we can write response. write (input. text.

Now we have finished writing our first program. Now we use CTR + Shift + B to compile the program and run it with the F5 key to view the effect. (Alternatively, you can run the command directly through "start execution (not debugging)" in the "debug" menu)
If there is no accident, we will see the following page:

Enter "www.itgao.com online tutorial" in the text box, and click "OK" to see what the effect will be:

The page outputs the input content directly to the page :)
After the program is ready, how can it be released? This is the Asp.net Application Deployment function. There are two ways to deploy an application:
1. Copy a Website: copy the program to the target server through the copy website function in the "website" menu in Vs, for example:

This method is a simple file copy process.
2. website publishing: Compile the program using the "Publish Website" function in the "generate" menu in Vs and copy the compiled files to the target server, for example:

The process of creating, compiling, compiling, and deploying the first ASP. net2.0 application is complete here.
Which of the following statements, functions, and data types are commonly used in the C # language in Asp.net? What are the rules to follow? We will learn this knowledge with you in the following chapters.

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.