passing parameters to or invoking a method of an activex control in asp

Discussion in 'ASP General' started by Chaduke, Jul 30, 2003.

  1. Chaduke

    Chaduke Guest

    I wrote a simple client/server chat program and the client runs as an
    activex control within an asp page. I have the users logging into
    the page using widows authentication and I'm using
    Request.ServerVariables("AUTH_USER") to get the users name. I'd like
    to pass this name to the activex chat client thru the page but I'm
    having some difficulty. I tried passing it as a parameter to the
    "Tag" property within the <OBJECT> element like this:

    <%
    username=Request.ServerVariables("AUTH_USER")

    username=right(username,len(username)-instr(1,username,"\"))
    ' remove the domain or machine name from the username

    Response.Write "<PARAM NAME=" & chr(34) & "Tag" & chr(34) & " VALUE="
    & chr(34) & username & chr(34) & ">"
    %>

    When I do this the ActiveX control doesn't appear on the page. Is
    there a better way to do this? I also tried creating a public sub in
    the activex control and calling it as a method from within the page
    but I can't seem to get the syntax right. I keep getting "Object
    Required" errors.

    Thanks in advance.
    Chaduke, Jul 30, 2003
    #1
    1. Advertising

  2. Look at your resulting HTML, and see if the Object/Param tags have any
    missing info in them that makes the control invisible.

    --
    Manohar Kamath
    Editor, .netBooks
    www.dotnetbooks.com


    "Chaduke" <> wrote in message
    news:...
    > I wrote a simple client/server chat program and the client runs as an
    > activex control within an asp page. I have the users logging into
    > the page using widows authentication and I'm using
    > Request.ServerVariables("AUTH_USER") to get the users name. I'd like
    > to pass this name to the activex chat client thru the page but I'm
    > having some difficulty. I tried passing it as a parameter to the
    > "Tag" property within the <OBJECT> element like this:
    >
    > <%
    > username=Request.ServerVariables("AUTH_USER")
    >
    > username=right(username,len(username)-instr(1,username,"\"))
    > ' remove the domain or machine name from the username
    >
    > Response.Write "<PARAM NAME=" & chr(34) & "Tag" & chr(34) & " VALUE="
    > & chr(34) & username & chr(34) & ">"
    > %>
    >
    > When I do this the ActiveX control doesn't appear on the page. Is
    > there a better way to do this? I also tried creating a public sub in
    > the activex control and calling it as a method from within the page
    > but I can't seem to get the syntax right. I keep getting "Object
    > Required" errors.
    >
    > Thanks in advance.
    Manohar Kamath [MVP], Jul 31, 2003
    #2
    1. Advertising

  3. Chaduke

    Chaduke Guest

    At first I was afraid that using single quotes might be the culprit,
    that's why I have the chr(34) functions in there to produce double
    quotes in the resulting HTML, but either way the control doesn't
    appear. The syntax looks fine, its just passing the parameter that
    causes the control to not show up. If I omit the <PARAM> tag it works
    fine.

    On Thu, 31 Jul 2003 08:55:41 -0500, "Manohar Kamath [MVP]"
    <> wrote:

    >Look at your resulting HTML, and see if the Object/Param tags have any
    >missing info in them that makes the control invisible.
    Chaduke, Jul 31, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Allan Cammish
    Replies:
    1
    Views:
    3,768
    Rajesh.V
    Nov 6, 2003
  2. jb
    Replies:
    1
    Views:
    414
    Laurent Bugnion
    Dec 4, 2006
  3. vml
    Replies:
    0
    Views:
    1,032
  4. Roni.Brown
    Replies:
    1
    Views:
    347
    Alf P. Steinbach
    Jan 24, 2008
  5. v1nce

    how to pass parameters when "invoking" a control

    v1nce, Feb 24, 2004, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    126
    v1nce
    Feb 26, 2004
Loading...

Share This Page