|
 |
asp_web_howto thread: passing ASP Data into COM Object
Message #1 by marcusgarfieldquigley@h... on Thu, 31 Jan 2002 19:45:14
|
|
Hi
Not sure if this is the correct forum
Sorry if not
anywho
i have a session variable in ASP that just contains a custom stock object
(contains just a few props: name, symbol, price, change)
now i want to populate a com object on a web page with this information
using a method "sub Startticker(stk as stock)"
i call the method during the window_onLoad() event
can anyone tell me how to pass in the variable into the vbscript?
Much apprec.
Marcus
Message #2 by Oleg Kapeljushnik <c-oleg.kapeljushnik@w...> on Thu, 31 Jan 2002 14:54:36 -0500
|
|
You can use session to move some information between
COM Object and ASP pages or other direction.
Oleg.
-----Original Message-----
From: marcusgarfieldquigley@h...
[mailto:marcusgarfieldquigley@h...]
Sent: January 31, 2002 7:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] passing ASP Data into COM Object
Hi
Not sure if this is the correct forum
Sorry if not
anywho
i have a session variable in ASP that just contains a custom stock object
(contains just a few props: name, symbol, price, change)
now i want to populate a com object on a web page with this information
using a method "sub Startticker(stk as stock)"
i call the method during the window_onLoad() event
can anyone tell me how to pass in the variable into the vbscript?
Much apprec.
Marcus
$subst('Email.Unsub').
Message #3 by "TomMallard" <mallard@s...> on Thu, 31 Jan 2002 11:46:37 -0800
|
|
For server side:
set objCOM = server.createobject("progID.xxxxx")
strName = objCOM.Name 'if that's how it's set up...
strPrice = ojbCOM.Price
...
Then use these to insert into the html being sent to the client.
<!--Personally I'd use a function for this and just pass in values to it and
get some html as a string back instead of passing in an already created
object. Or, move the object creation to the function, whatever.--!>
If this is an activeX on the client you'd use object tags to have it passed
to the client and then use script to extract the values to display with
DHTML.
tom mallard
seattle
-----Original Message-----
From: marcusgarfieldquigley@h...
[mailto:marcusgarfieldquigley@h...]
Sent: Thursday, January 31, 2002 7:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] passing ASP Data into COM Object
Hi
Not sure if this is the correct forum
Sorry if not
anywho
i have a session variable in ASP that just contains a custom stock object
(contains just a few props: name, symbol, price, change)
now i want to populate a com object on a web page with this information
using a method "sub Startticker(stk as stock)"
i call the method during the window_onLoad() event
can anyone tell me how to pass in the variable into the vbscript?
Much apprec.
Marcus
$subst('Email.Unsub').
|
|
 |