Chapter 2
Understanding ASP. NET 2.0 • ASP. NET is a brand new framework for web development, which contains many new features. It uses mature programming languages such as VB. NET (visual
Basic. net, hereinafter referred to as VB. net) and C #; ASP. net uses compiled languages to improve performance and scalability. asp. NET provides code that is easier to write and clearer in structure, which can be easily reused and shared. asp. net uses Web forms to make development more intuitive. It leverages object-oriented technology to promote reuse of components. In addition, ASP. NET also includes page events, Web controls, buffer technology, server controls, and data binding improvements. The class libraries used by ASP. NET and the. NET Framework allow external calls of functions, providing more new development opportunities for programmers. 1.1 ASP. NET 2.0
What is the first version of ASP. NET (1.0 and 1.1), which quickly caused a sensation in the Web application development camp between 2001 and 2003. The program staff quickly felt that by using the powerful and flexible. net
Framework development can greatly reduce the coding time, while Programmers spend a lot less time solving the problem of Customer Code. Enterprise information managers can also see that they will invest more resources to improve the IT structure. ASP. NET is indeed a milestone version, which simplifies the work of developers. (For details, refer .) 1.2 first ASP. NET 2.0 website • through the first ASP. NET 2.0 website, let readers understand the creation process of a website and what the effect of ASP. NET 2.0 website is. This section describes how to create, design, and publish a website. 1.2.1 create a website
• The Front has already said so much. I believe many readers have been excited and would like to experience the charm of. ASP. NET 2.0 in person. Next, I will lead you through ASP. NET 2.0 to create an ASP. NET
2.0 website. (For details, refer .) 1.2.2 design websites
• After creating a website, you need to design the website. Before doing this, let's first introduce the concept of "Page framework. The page class is the end point of the module pipeline that processes any access requests. Any ASP. NET page is an instance of the class derived from the page class. At the same time, the page class acts on the system components of the original request, so that it gradually finds all the information required by the Page Object and generates the corresponding tag. 1.2.3 pre-compile and publish the website • ASP. NET can pre-compile the site before it is put into use. This provides users with a faster response time and a method to avoid deploying source code. You can also identify bugs during compilation before opening the site. Site pre-compilation can effectively deploy the site to the finished server. You can pre-compile the website at the current location of the website, or pre-compile the website and deploy it on other computers. (For details, refer .) 1.3 HTML knowledge required for ASP. net2.0 • First, let's get to know the HTML language: • HTML is hypertext
The abbreviation of markuo language. The Chinese name is a hypertext markup language. • HTML is the standard language for webpage production. Since version 4.0, it has fully considered and improved various language Environments, device environments, and display environments. The new version is html4.01, some functions in html4.0 are further improved, including international settings, compatibility, style support, and script and printing. • HTML is the basic language for Web pages. No matter which technology is used for web development, it is ultimately manifested in the user's browser or HTML code. 1.3.1 using forms to submit data • any web application system must perform operations on the data. For example, user registration and information retrieval. Then how does the data information interact with the server? (For details, refer .) 1.3.2 layout using tables
• As you can see, the display shown in Figure 1.10 is messy, not a bit aesthetic. This is because there is no page layout, and elements in the webpage will be displayed without rules. This section describes the page layout. • There are two existing layout methods for Webpage Design: table layout and Div + CSS layout, which is strongly recommended by W3C. However, for the moment, table layout is still the first choice for most web designers. 1.3.3 hyperlink
• There are usually some links on the webpage. Clicking these links will enter the corresponding page or display the corresponding information. This is the hyperlink to be discussed in this section. A hyperlink is essentially a part of a Web page. It is an element that allows the current web page to be connected to other web pages or sites. Only when web pages are linked together can a website be truly formed. 1.3.4 CSS beautifying webpages
• CSS is often called cascading
Stylesheet ). CSS technology is used when creating web pages to effectively control the layout, Font, color, background, and other effects of pages. You only need to make some simple modifications to the corresponding code, you can change the appearance and format of different parts of the same page, or different webpages. (For details, refer .) 1.4 JavaScript knowledge required for ASP. NET 2.0 • Javascript is a scripting language used to develop client-and server-based Web applications. Javascript is a Web-enhanced technology. When used on a client, this language helps convert static pages into interactive, intelligent dynamic pages. It can be used to make applications very subtle. For example, if the client computer is located at night, even if the server is still in the early morning time, the application will also send greetings "Good evening" to website visitors "!. Javascript can recognize and process user events such as mouse clicks. Javascript can also be used to verify user input data on the client before the form is submitted to the server for processing. This saves time and reduces the pressure on the server. 1.4.1 use JavaScript to redirect pages • in actual development, you often need to redirect from one page to another. (For details, refer .) 1.4.2 verification form • the most commonly used form should be the form. For example, if you go to the Internet to find a job, when you first go to a recruitment information network, the system will require you to register and log on before you can search for a job. During registration, the system will require you to fill in many forms. If you do not fill in or enter non-standard data, a warning box will pop up soon. This is to verify the role of the JavaScript code of the form. 1.4.3 common JavaScript objects • objects can be defined as integrated data "packages ". Objects contain attributes (variables) that define themselves and methods (functions) for data processing ). (For details, refer .) 1.5 FAQs • this chapter is the first chapter of the book, first introduces ASP. NET 2.0, and then explains in Visual Studio 2005
Create websites, design pages, and pre-compiled websites in the integrated development environment. Although it is just a few simple examples, complicated and powerful websites are further developed based on it.