CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2001
    Posts
    2

    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)?



  2. #2
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    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

  3. #3
    Join Date
    Aug 2001
    Posts
    2

    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?


  4. #4
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    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

  5. #5
    Join Date
    Feb 2000
    Posts
    137

    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
  •  





Click Here to Expand Forum to Full Width

Featured