|
|
|
|
|
| | |
|
Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Calling a method on a ASP page from a component |
From: |
Mike Barger |
Date: |
12/10/1999 12:02:30 PM |
IP: |
207.7.78.247 |
ok here goes some code snippits using object context which gives you a handle back to the environment from which the object was instanciated...
Part of your DLL may look like this (forgive the line wraps) :
-------------------------------------------
clsEcho: demonstrates ObjectContext
Make sure you include:
"Microsoft Transaction Server Typs Library"
in your project references.
after compiling place the object in MTS
-------------------------------------------
Class clsEcho
Public Sub Proxy(ByVal astrMessage as String)
Dim objContext as ObjectContext
Dim strEcho as String
Set objContext = GetObjectContext()
strEcho = objContext("Echo") astrMessage
objContext("Response").Write strEcho
Set objContext = Nothing
End Sub
End Class
Part of the asp page may look like this (forgive the line wraps):
------------------------------------
demo.asp page
------------------------------------
<%
Option Explicit
Function Echo(astrMessage)
Echo = "Echo: " & astrMessage
End Function
Dim objEcho
Set objEcho = Server.CreateObject("Echo.clsEcho")
objEcho.Proxy "Mike"
Set objEcho = Nothing
%>
This should return the text "Echo: Mike" to the browser. |
Previous Message
|
|

|
|
|
|
|
|
|
|
|
|