Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > passing parameters to or invoking a method of an activex control in asp

Reply
Thread Tools

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

 
 
Chaduke
Guest
Posts: n/a
 
      07-30-2003
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.
 
Reply With Quote
 
 
 
 
Manohar Kamath [MVP]
Guest
Posts: n/a
 
      07-31-2003
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.



 
Reply With Quote
 
 
 
 
Chaduke
Guest
Posts: n/a
 
      07-31-2003
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX control in python vs ActiveX control in vb 6 (piece of code) vml Python 0 08-22-2007 09:57 AM
Passing parameters to an activeX control jb ASP .Net 1 12-04-2006 06:10 PM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
how to pass parameters when "invoking" a control v1nce ASP .Net Building Controls 2 02-26-2004 04:16 PM
Passing parameters to client side ActiveX control Allan Cammish ASP .Net 1 11-06-2003 03:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57