|
-
August 6th, 2001, 05:19 PM
#1
Passing variables/parameters from ASP to ActiveX
I need to retrieve a QueryString/Form variable posted via an ASP page to an ActiveX control so that I can then run a query against a database on the Web server via the ActiveX control.
Can you show me how to retrieve the posted variable within the ActiveX Control(VB)?
-
August 6th, 2001, 05:53 PM
#2
Re: Passing variables/parameters from ASP to ActiveX
Just a suggestion. You can provide a method in your ActiveX control so that you can pass the information via ASP. So if you have a method call RunQuery(), you can do the following:
<%
oQuery = Server.CreateObject("YourActiveX")
oQuery.RunQuery <the value that is passed from ASP page>
%>
-Cool Bizs
Good Luck,
-Cool Bizs
-
August 6th, 2001, 06:01 PM
#3
Re: Passing variables/parameters from ASP to ActiveX
Okay. I think I understand what you are suggesting -- however, maybe my question is even more rudimentary than it appears.
How do I "read" the variable that I am passing via a QueryString by the ActiveX Control (OCX) that is resident on the resulting ASP page?
So if I have an ASP data entry form and I post this to another ASP page that has the OCX referenced on it(object classid), How do I pass the variable from the ASP to the OCX?
-
August 7th, 2001, 12:34 AM
#4
Re: Passing variables/parameters from ASP to ActiveX
I might be wrong but I think you won't be able to do that. When you instantiate the ActiveX control, it does not work by itself does it? It has to somehow receive some kind of signal from someone in order to work.
However, if you're actually developing an ISAPI extension (I've never done this but have seen a colleague working on it), you should be able to retrieve the QueryString data directly. Of course this does not interface via ASP.
I might be totally misunderstood you .. but this is a little help that I could offer 
-Cool Bizs
Good Luck,
-Cool Bizs
-
August 8th, 2001, 06:25 AM
#5
Re: Passing variables/parameters from ASP to ActiveX
If your dll is running under MTS, you can get a reference to the MTS object context. This allows your dll to directly access the intrinsic ASP objects (Server, Request, Response, etc.) directly from within the dll. Then it is just a matter of doing a Request.QueryString("YourVariableName") to get your parameter value.
Hope this helps.
Spectre
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|