ASP.NET Summary

黄舟
黄舟Original
2017-02-23 10:16:371605browse



## Although I have finished watching the ASP.NET video, the connection between each chapter taught by the teacher in the video is not very strong, so I connected the knowledge by drawing a mind map after class. I just sorted it out based on my notes and understanding. If there are any omissions, I hope you will add them.

Official explanation (from Baidu Encyclopedia):

ASP.NET is part of .NET FrameWork, a Microsoft Corporation technology, a that enables embedding in web pages Script Server-side scripting technology that can be executed by an Internet server, which can dynamically create documents on the Web server when they are requested via HTTP. Refers to Active Server Pages (dynamic server pages, running on the IIS (Internet Information Server) service, is a program in the Web server developed by Windows.

My understanding:

ASP.NET is not a language, it is a powerful technology for dynamically creating web.

## Expand according to mind map:

1. Overview

The official explanation and personal understanding of ASP.NET

#.


## 2. Common objects

1) Page:

Points to the page itself and can be used during the entire page execution period This object is equivalent to the form in the C/S stage when we learn it.

2) Request:

Interact with the client, collect client forms, cookies, hyperlinks or collect server-side environment variables, and store request information.

Five collections of Request objects:

QueryString: used to obtain the query string information attached to the URL by the client, for example: str=Request.QueryString["strUserName"];

Form: used to obtain the information entered by the client in the Form form, for example: str=Request.Form["strUserName" ];

Cookies: used to obtain the client's cookie information, for example: str=Request.Cookeis["strUserName"];

ServerVariables : Used to obtain the header information in the HTTP request information issued by the client and the server-side environment variable information, for example: str=Request.ServerVariables["REMOTE_ADDR"]; returns the client IP address.

ClientCertificate: Used to obtain the client's authentication information, for example: str=Request.ClientCertificate["VALIDFORM"]; For websites that require security verification, return the valid start date.

3) Response:

Stores the output information. The common method Write can output the specified text content, which is equivalent to the print method in VB.

4) State saving object:

Session: Stores session information. Generally, user status information is stored when a user logs in. When visiting other pages or reopening the page Determine whether the Session exists. If it is not null, it means that the user has logged in and can continue to access. Otherwise, it will redirect to the login page.

Cookie: Used to record user information so that you don’t have to write it again when you log in next time.

Application: Used to store and retrieve information that can be shared between users.

5) Server:

Access the properties and methods of the service.


3. Controls

1) The difference between HTML controls and web controls:

HTML controls and web controls have different methods of handling events. For HTML controls, the browser will process it when an event is raised. But for web controls, the browser can only generate events but not process them. The client will send information to the server, which will be processed by the server.

2) Validation control:

RequiredFieldValidator: Non-null validation, used to check whether there is an input value.
CompareValidator: Compare verification, compare two inputs according to settings.
RangeValidator: Range verification, whether the input is within the specified range.
RegularExpressionValidator: Regular expression validation.
CustomValidator: Custom validation control.
ValidationSummary: Validation summary, summarizes the validation results.

3) Data binding control:

GridView: used to display the values ​​of the data source in the table. It specifies the display style of the table. Each column represents a Field, each row represents a record. This control has relatively complete functions. In addition to binding data sources, it can also sort, select, update, delete, and paging data.

DataList: Compared with GridView, it is slightly more complicated. Users need to define the display style of data themselves. Unlike GridView, which displays one record per row, DataList can display multiple records per row.

Repeater: Usage is somewhat similar to DataList, except that it cannot display multiple records in one row, but it can flexibly control the display style of data by defining templates.

4) User controls and custom controls

Neither of these are system controls. They are created by users according to their own usage needs. Generally, user controls can only be used in one project and cannot be added to the toolbox; while custom controls can be added to the toolbox so that they can be used multiple times in multiple projects. User controls are more convenient to write, while custom controls are more cumbersome to write. However, custom controls are highly reusable and can effectively solve problems that are often used and cannot be completed by existing controls.


## 4. Similarities and differences between ADO.NET and ADO

Similarities:

1) They are all database programming interfaces.

2) Can operate a variety of databases.

3) All support ODBC.

Differences:

1) The basic technology is different.

2) The intrinsic data types are different.

3) Metadata and XML support are different.

5. Configuration file

1) Two configuration files:

machin.config Also known as the server configuration file, it provides the default configuration of the entire machine. Modifications to this file will affect the local site.

web.config is generally used for application-level configuration files. Its modification does not affect other sites and can also be used in subdirectories under the site.

2) Encryption and decryption

The most commonly used MD5 encryption algorithm can avoid the trouble caused by data leakage to a certain extent.

3) Authentication

Windows authentication has higher security and can only be used on the Windows platform, and the domain name must have an account.

Passport authentication, connect to Windows Live ID service for verification.

Forms authentication uses form data to provide verification. Developers customize the verification logic and let the form verification tool write verification credentials.

4) Authorization

File authorization: Authorize access permissions by checking the access control list of the file.


URL authorization: URL set by the developer to grant permissions.

5) Custom errors

Mode: on means to enable custom errors, off means to disable custom errors.

RemoteOnly: Indicates that only remote clients are displayed, and local debugging displays normal errors.

6. Installation and Deployment

The new installation and deployment project is similar to the C/S stage, so I won’t go into details here.


## Learning ASP.NET made me realize that it is not that easy to make a good website. The accumulation of fragmented knowledge is our most valuable wealth. If you don’t accumulate small steps, you won’t be able to reach a thousand miles. If you don’t accumulate small streams, you won’t be able to become a river. Only the accumulation of bits and pieces can produce huge changes.

Passing can only give you a general understanding of knowledge. The above content is connected through mind maps based on what the teacher said in the video. During the period, I also checked a lot of information. Teachers and classmates are invited to criticize and correct omissions and deficiencies.

The above is the summary of ASP.NET. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn