Results 1 to 8 of 8

Thread: ActiveX and .asp variables passing.

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    5

    ActiveX and .asp variables passing.

    Hello All,

    just a simple question.
    How to pass variable from ActiveX control to parent .asp page and back? Or create a session variable from ActiveX?

    Thanks.

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Call the page through ActiveX control with query strings.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    5
    Thanks. It works, but I need to hide variable from user.
    Is it possible at all?

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    It is definitely possible if you know how to execute a POST method using the Inet Control.

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    5
    Excellent! Could you post a code sample then?
    Thanks.

  6. #6
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Sorry, but I don't know how to create a POST data. All I know is that the data is in the headers of the page.

  7. #7
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Use the MSXML.HTTP object to post to an ASP page.

  8. #8
    Lively Member
    Join Date
    Aug 2002
    Posts
    126
    here,

    in the page that posting the data:

    <form action="filename.asp" method="post">
    <input type="hidden" name="myField" id="myField" value="xxx"></input>
    </form>

    and the page "filename.asp" that will receive that data:
    <%
    dim myField
    myField = Request.Form("myField")
    %>

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