There is an article "Using VB to write pure ASP programs [Translated] [Technology]" in the VB and Basic areas of NetEase Virtual Community. In fact, I think the best method should be like this -
The definition in the original text is as follows:
Dim m_objResponse As Response
In fact, it is not very good for those who have written .dll, that is, if we want to take the program into an .asp program for debugging, especially when we make the .asp program that has passed debugging into .dll, . Standard component names are used in asp programs. The default component names are response, request, etc. In the quotation, m_obj is added in front. If this sentence is used in the program, corresponding changes must be made. This will bring a larger workload. Secondly, There is no improvement in the readability of the program.
Therefore, the best approach is to define it as follows:
Dim Context As ObjectContext
Dim Server As Server
Dim Request As Request
Dim Session As Session
Dim Response As Response
Of course, there will be more later
Private Sub Class_Initialize()
Set Context = GetObjectContext()
Set Server = Context(Server)
Set Request = Context(Request)
Set Response = Context(Response)
Set Session = Context(Session)
End Sub
Initialization.
It has been proved by practice that it is completely feasible.