Check to see if Active X Control is installed and display instructions if needed

  • Thread starter Thread starter Jay Douglas
  • Start date Start date
J

Jay Douglas

I have a 3rd parth ActiveX control that needs to be displayed within a web
page. If the user doesn't have the ActiveX control installed on their
computer I would like to display instructions on installing the ActiveX
control (using IE v6 SP 2)..

I'm having a hard time determining client or server side if the ActiveX
control is installed.

If you have any links or suggestions I would appreciated them.

Thanks.
 
When you use the <object> tag and the browser cannot create the
control, it will instead display any HTML markup you have inside.

For example, try something like:

<OBJECT CLASSID="...">
<SPAN STYLE="color:red">To install this control...
</SPAN>
</OBJECT>
 
You can do something like
if(Request.Browser.ActiveXControl)
{
Response.Write("<script>var obj = server.createobject("customcontrol");
if (obj == null) alert('need control blahble')</script>");

}
roughly
--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
_________________________
 
Back
Top