467,888 Members | 1,334 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,888 developers. It's quick & easy.

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

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.
Jul 19 '05 #1
  • viewed: 5705
Share:
2 Replies
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" <cd***@NOSPAM.brucefoodsla.com> wrote in message
news:s0********************************@4ax.com...
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.

Jul 19 '05 #2
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]"
<mk*****@TAKETHISOUTkamath.com> wrote:
Look at your resulting HTML, and see if the Object/Param tags have any
missing info in them that makes the control invisible.


Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Kai I. H. | last post: by
7 posts views Thread by Ken Allen | last post: by
1 post views Thread by Allan Cammish | last post: by
reply views Thread by mitch | last post: by
1 post views Thread by jb | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.