Know the object of ASP built-in

zhaozj2021-02-16  47

Know the object of ASP built-in

ASP Built-in Application, Asperor, Request, Response, Session, ObjectContext, Server, etc., and each object has its own properties, method, collection, or event. Now let's introduce the meaning of these nouns, let us better understand the built-in object of ASP:

"Object" is like a variety of objects we have seen in our daily lives, such as computers, refrigerators, cars, mobile phones, etc., and objects may be composed of many objects, computers: Computers are an object And the computer is composed of hard disk, CPU, memory, display card, etc.

"Property" is the characteristics of the object, for example, the computer is an object, while the computer's level, manufacturer, etc. can be used to describe the properties of the computer, and, for example, RESPONSE Is an object built into an ASP, and it has an attribute isclientConnected that can be used to describe whether the browser is still connected to the server. To access the object's properties, you can write ObjectName.Property, for example: response.isclientConncetion.

"Method" is used to perform an action, for example, the computer is an object, while boot, shutdown, executive application, scanning hard disk, etc. is a method of this object; more, RESPONSE is Built-in object, and it has a method called WRITE, you can display the specified information on the browser side. To access objects, you can write into ObjectName.Method, such as Response.write.

"Collection" refers to a group of "value" (Value), this explanation is too abstract, let's give an example, when the browser enters the web form data and press the "Submit" button, The name of the Form field is passed to the web server in a form of the browser. For example, in the queryString collection of the ASP object, if you want to obtain the value of the username field or the Userage field, you can write RESQUEST.QUERYSTRING. ("UserName") and Resquest.QueryString ("userage")

"Event" is a specific signal warning in some cases, such as, suppose you have a car, when you start the car, the car will make a sound warn you, this is a Event. Also, SESSION is an object built into an ASP, and it will generate session_onstart and session_onend events when the user is activated or ending the browser.

转载请注明原文地址:https://www.9cbs.com/read-23102.html

New Post(0)