
ObjectContext vs. Passing ASP objects from ASP page
We are in the process of creating a VB COM web application. To this
point we have been passing the request, response, server, and session
object from the asp page to the COM object. I just realized that these
objects can be referenced from the objectContext object. Is it more
efficient to create the other ASP objects from the objectcontext of
pass them from the ASP page?
To pass the other ASP object from the ASP page to the COM object I use
the following code:
set objTest = Server.CreateObject("COMObject.Test")
call objTest.PaintPage(server, session, request, response)
To create these object using the objectContext object I use the
following code within the VB object:
'// Dimension ASP Objects
Dim objServer As Server
Dim objResponse As Response
Dim objRequest As Request
Dim objSession As Session
Set objServer = m_objContext.Item("Server")
Set objResponse = m_objContext.Item("Response")
Set objRequest = m_objContext.Item("Request")
Set objSession = m_objContext.Item("Session")
Is one way more effiecient than the other?
Thanks,
Kevin Baum
Sent via Deja.com
http://www.*-*-*.com/