ASP design and use Class 3

Source: Internet
Author: User

Http://www.tqts.net/Article/wlbc/asp/200607/8963.html

Class myclass
'// ---- Declare (Declaration is defined) the internal (Private [private]) variable of the myclass class
Private strauthor
Private strversion
Private strexample

'// --------------------------- Define the class event -------------------------------//
'// ---- Class_initialize () is the class initialization event. If you use this class at the beginning, the execution of this part is triggered first, next we will initialize the author and version of the class in this Member and display on the screen that the class has started.

Private sub class_initialize ()
Strauthor = "Thinking Source"
Strversion = "1.0"
Response. Write "<br> myclass started <br>"
End sub
'// ---- Class_terminate () is the end event of the class. Once the class is exited, the event is triggered, next we will set this event to exit this class, and it will show on the screen that this class has ended.

Private sub class_terminate ()
Response. Write "<br> myclass ended <br>"
End sub

'// --------------------------- User-defined method -------------------------------//

'// ---- This method returns a version.

Public sub information ()
Response. write "<br> coding by <a href = 'mailto: coder@sinobe.com '> maxid_zen </a> @ <a href = 'HTTP: // www.design60s.com '> www.design60s.com </a>. <br>"
End sub

'// --------------------------- Define the output attribute of the class -------------------------------//

'// ---- Specifies the attributes of the class. This attribute allows the user to initialize the strexapmle variable.

Public property let setexapmle (byval strvar)
Strexapmle = strvar
End Property

'// --------------------------- Define the output attribute of the class -------------------------------//

'// ---- Defines the attributes of the class. This attribute returns a version number.

Public property get version
Version = strversion
End Property

'// ---- Defines the attributes of the class. This attribute is the author number of the class returned.

Public property get author
Author = strauthor
End Property

'// ---- Defines the attributes of the class. This attribute returns a version number.

Public property get exapmle
Exapmle = strexapmle
End Property

End Class
 

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.