ASP.net summary, asp.net Summary

Source: Internet
Author: User

ASP.net summary, asp.net Summary
ASP.net

ASP. NET is. NET FrameWork is a Microsoft technology. It is a server-side scripting technology that allows scripts embedded in web pages to be executed by Internet servers, it can dynamically create HTTP request documents on the Web server. It refers to an Active Server Pages (Dynamic Server Pages) program running in IIS (Internet Information Server Service, a Web Server developed by Windows.

Operating principle

1. customer request web page
2. web service command file (. aspx)
3.asp.net code is sent to the Public Language Runtime for compilation
4. HTML streams are returned to browsers and instructions.
5. the browser processes HTML and displays the page

Object

Summary of several objects in ASP. NET

The Response object is used to dynamically respond to client requests, control the information sent to the user, and dynamically generate a Response.
The Request object mainly allows the server to obtain some data from the client browser, including parameters, cookies, and user authentication transmitted from the HTML form using the Post or GET method.

The purpose of an Application Object in network development is to record the information of the entire network, such as the number of online users, online lists, opinion surveys, and online elections. Information is shared among multiple users in a given application and stored permanently during server running.

The Session object is used to store the information required by a user to access a specific aspx page from the moment the user leaves. When you switch the page of an application, the variables of the Session object are not cleared.

The Server object provides access to methods and properties on the Server. The class name is HttpServerUtility.

 

Widget

At the beginning, I checked the learning materials of asp.net and used the controls. At one time, I thought aspnet was a change to controls. Later I found no. Later, I found that in asp.net, everything is a control. These controls make some common tasks very simple. Such as form submission, client authentication, distribution system, and website configuration.

 Controls can be split into server controls and HTML controls

HTML server controls are known as HTML labels. For example, <input type = "text"/> is a text box label. in ASP. NET, this label is called an HTML control. ASP. NET does not process this control, and we cannot use it in the forward way. Of course, we can convert it into an HTML Server Control. The converted HTML space code is <input id = "Text1" type = "text" runat = "server"/>, it adds an id attribute and a runat = "server" attribute. In this way, you can access and control the control through programming. Any HTML control with the runat = "server" attribute can be converted to a server control.

It can also be divided into user controls and user-defined controls

User Controls allow developers to easily define and compile controls based on application requirements. The programming technology used by the development will be the same as the programming technology used to write web forms. As long as the developer modifies the control, all the controls on the page of the control can be changed. Including various list controls for verification controls

Unlike user controls, custom controls are implemented by the user and define the attributes, methods, and events common to all server controls, among them, the most important thing is to include methods and events that control the control to execute the lifecycle, as well as common attributes such as ID.


Others

Session and cookie

1. The cookie mechanism adopts the client-side persistence scheme, while the session mechanism adopts the server-side persistence scheme.

2 cookie content mainly includes: name, value, expiration time, path and domain. The path and the domain form the scope of the cookie.

If no expiration time is set, it indicates that the cookie's life cycle is the browser session period. When the browser window is closed, the cookie disappears.

Session mechanism. The session mechanism is a server-side mechanism. The server uses a structure similar to a hash (or a hash) to save information.

When the program needs to create a session for a client request, the server first checks whether the client request contains a session ID, if it already exists, it indicates that a session has been created for this client before, and the server retrieves the session according to the identity. This session id will be returned to the client for saving in this response. The cookie can be used to save the identity, so that the browser can automatically send the identity to the server according to the Rules during the interaction process.


Summary
In general, in aspnet, we learned how to use objects, the applications of various controls, and also tried to use these things to implement small examples. In the future, we will continue to learn more. Thank you for your advice.

 

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.