ASP. NET [2]

Source: Internet
Author: User

From the previous section, we learned about ASP. net is a dynamic web page technology that runs on the server.. Net code. The server receives and processes the dynamically generated HTML code and sends it to the browser. Then, the browser parses the HTML code to present the data to the user.


The following describes three main parts of ASP. NET:



It should be said that Asp.net represents the development stage. Among the three programs, ashx is the most efficient. aspx can be used to drag and drop controls during development, but the server needs to consume resources and use a large amount of resources during execution, MVC came out recently, and the execution efficiency was between the first two. The emergence of MVC reduced the use of Aspx.


These three parts have their own use. When ashx is used for HTML code, aspx is used for server response code, and when the code is complex, webform has two files aspx and aspx during development. CS, aspx is the browser code, aspx. CS is the server-side code. The front-end and back-end code are separated to facilitate division of labor. MVC is suitable for developing large websites and is a relatively efficient mode.


ASP. NET has six common objects:


1. The response object encapsulates the HTTP Response Information from ASP. NET operations. Its Class Name Is httpresponse. Through the request object, we can collect form, cookies, hyperconnections, or server environment variables from the client.


2. The request object enables ASP. NET to read the HTTP value sent by the client during the Web request. Its Class is httprequest. The response object can deliver the server processing results to the browser in the form of HTML code, and then the browser displays the data to the user. The request and response are relative. One is responsible for collection and the other is responsible for output.


3. The application object defines the methods, properties, and events common to all application objects in ASP. NET applications. It is used to record the information of the entire network during actual development. Its Class is httpapplication.


4. The session object provides access to the session state value, session level settings, and lifetime management methods. It can save information related to the current user session, and its class name is httpsessionstate.

5. Cookie objects provide security methods for creating and operating httpcookies. The class name is httpcookie.


6. the sever object provides the Helper method for processing Web requests. Its Class Name Is htt?verutility.


The six objects have their own methods and attributes, providing technical and functional support for web development. These six objects are indispensable in Web development, you must be familiar with these six objects in future studies. You can refer to the help document of Visual Studio 2010 to search for the classes corresponding to the six objects for further learning and understanding, finally, a Web application satisfactory to another user is developed. This section is here. At the beginning, we will combine these six objects to learn general processing programs. Thank you.

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.