473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
2 5915
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Joel | last post by:
Hi all, Forgive me if I've expressed the subject line ill. What I'm trying to do is to call a c++ function given the following: a. A function name. This would be used to fetch a list of...
2
by: Kai I. H. | last post by:
Hi, I have an activeX control (programmed with c++) which is displayed in the Internet Explorer via the object tag. Now, as you probably know, you can pass parameters to the activeX control by...
7
by: Ken Allen | last post by:
I have a .net client/server application using remoting, and I cannot get the custom exception class to pass from the server to the client. The custom exception is derived from ApplicationException...
3
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1...
1
by: Allan Cammish | last post by:
Dear all I am developing a web application in ASP.NET & VB.NET and I need to pass parameters from the server side code to an ActiveX control which is loaded and run on the client's browser. ...
2
by: Bob Hanson | last post by:
Hello, I first have a working embedded ActiveX control in a HTML page that has PARAM NAME statements in it. I am looking for help on how to pass these parameter strings to the HTML page...
0
by: mitch | last post by:
Hi, could anyone help me with the following problem? I have an ActiveX control developed using Visual Studio 6.0 and it has a method declared in the .odl file as follows: void...
0
by: Haxan | last post by:
Hi, I have an unmanaged application that converts a function pointer to a delegate and then pass this as a parameter(delegate) to a managed function which then invokes it. Currently Im able to...
1
by: jb | last post by:
Hi, I've a ACTIVEX component in an ASPX(aspnet 2.0) page, and I need to pass parameters dinamically, someone know how to do this? Thanks Jesus
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.