by Manikantan (12 Submissions)
Category: Active Server Pages
Compatability: ASP (Active Server Pages)
Difficulty: Unknown Difficulty
Originally Published: Sun 29th October 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Describes On How Activex Controls can be Used Along With ASP
Manikantan
3rdagenda
Web Development
www.3rdagenda.com
email:[email protected]
Activex Controlling in ASP
Create An Active Control and Use Activex Control interface Wizard
1)create The Interface properties in ur Vb Code..
2)create the custom properties...
3)Create Public Functions Wherever U want to Change prop and Appearance in ur Control
After the Control has been Created in can be added as Plug in to Interdev
so that the function can be called from ur vbscript...
Now all the properties and methods that u have created will be accessible
from interdev...
Public Sub effects()
'code which will do some manipulations to the controls when this is called
'it can the code which changes the bagcolor
'it can be the code which changes the caption
End Sub
and below is the code for the html/ASP page
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
script language="vbscript">
sub chg_look()
obj_actx.effects
end sub
</script>
<BODY>
<P>
<OBJECT classid=clsid:07E28BF3-67D1-11D4-B7CA-008048B56EB1 id=obj_actx>
<PARAM NAME="_ExtentX" VALUE="8467">
<PARAM NAME="_ExtentY" VALUE="6350">
<PARAM NAME="BackColor" VALUE="-2147483633">
<PARAM NAME="Appearance" VALUE="0">
<PARAM NAME="Alignment" VALUE="0">
</OBJECT>
</P>
<form>
<input type="button" onclick="vbscript:Chg_look()" >
</form>
</BODY>
</HTML>
I use a public method
You can do that even at server...
but the control's visible prop should be mapped to ur usercontrol...
All depends in mapping the prop and methods in ur Interface wizard...
the Whole thing depends upon the Interface wizard.
<OBJECT classid=clsid:07E28BF3-67D1-11D4-B7CA-008048B56EB1 id=checks1>
<PARAM NAME="_ExtentX" VALUE="8467">
<PARAM NAME="_ExtentY" VALUE="6350">
<PARAM NAME="BackColor" VALUE="-2147483633">
<PARAM NAME="Appearance" VALUE="0">
<PARAM NAME="Alignment" VALUE="0">
<param name="Visible" value=<% response.write obj_prop %>>
</OBJECT>
here obj_prop is a variable which i populate from the server depending upon the
need specified by the User
or use can vb script for controlling the appearance and controlling
other methods in ur control...
Only works in IE