473,654 Members | 3,129 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ServerV ariables("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=Reques t.ServerVariabl es("AUTH_USER" )

username=right( username,len(us ername)-instr(1,usernam e,"\"))
' 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 5925
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.b rucefoodsla.com > wrote in message
news:s0******** *************** *********@4ax.c om...
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.ServerV ariables("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=Reques t.ServerVariabl es("AUTH_USER" )

username=right( username,len(us ername)-instr(1,usernam e,"\"))
' 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*****@TAKETH ISOUTkamath.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
2799
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 function descriptors for the overloaded functions of that name. A function descriptor would contain the address of the function to be called, and a description of the parameters that it must take. b. A list of parameters. This would be compared to the...
2
2172
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 using the param tag. My question now is, how do I get these parameters into my activeX control. I found hints about using IPropertyBag, but didn't find a good example on how to implement that. I even don't know whether this is the right way to...
7
4742
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 and is defined in an assembly common to the client and server components. The custom class merely defines three (3) constructors -- the null constructor; one with a string parameter; and one with a string and innner exception parameter -- that...
3
10831
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 which has to parameters passed to it from another Web page Parameter # 1 dbid and Parameter # 2 reportid. I know that I can access the values of the parameters from the code behind .aspx.cs using Request.QueryString so
1
2245
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. Before anyone asks me, I have to use an ActiveX control, and it has to run on the client side! Regards
2
1595
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 instead of hardcoding using C#. Thanks in advance,
0
1302
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 GetEmptyVectorDatumVariantArray(long nNumData, VARIANT* pVariantArrayRequired);
0
2010
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 jump to this unmanaged function, but the values of the parameters inside this function Im seeing are not correct(they have some garbage values). //unmanaged class (C++ application)
1
1532
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
8372
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8285
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8706
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8591
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1592
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.