Program | skills | problems | Conversion of a debugged ASP program into a component in VB
February 3, 2001
NetEase virtual community in the "VB and basic area" in a "use of VB to write a pure ASP program [to][technology]", in fact, I think the best way should be:
The definition in the original text is as follows:
Dim M_objresponse as Response
In fact, for us to write a. dll, it is not very good, that is, if you want to get the program to the. asp program for debugging, especially if we will have been debugging through the. ASP program to make a. dll, the. ASP program uses the standard component name. The default component name is response, request, and so on, in the citation in front of the m_obj, then if the program used this sentence, you also need to make the corresponding changes, this one will bring a larger workload, two of the program's readability and no improvement. Therefore, the best approach is to define the following:
Dim context as ObjectContext
Dim Server as Server
Dim Request as Request
Dim Session as session
Dim Response as Response
And, of course, there's the back.
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 of.
It is proved by practice that it is completely feasible.