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

C

Chaduke

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.
 
M

Manohar Kamath [MVP]

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

Chaduke

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,266
Messages
2,571,083
Members
48,773
Latest member
Kaybee

Latest Threads

Top