views:

85

answers:

2

I have an ASP.Net website that pushes image files to the client. Due to wacky needs from our diverse user-base, some client workstations have an ActiveX component that they need to use in this website to manipulate this image, but due to cost, not all users have this control. What I'd like to be able to do is determine if the client has this ActiveX control installed and then script the tag based on the result of this test.

I've been exploring the Request object thoroughly and haven't found anything that does exactly what I need. Request.Browser.ActiveXControls is nice to know, but I need to drill-down further. Is there another namespace I should be looking at? Is this even possible?

Thanks in advance.

+3  A: 

You can't interrogate ActiveX availability from the server side. Even the Browser.ActiveXControls flag is a guess from the UA string, which can easily be wrong.

All you can do is attempt to instantiate the object from JavaScript, and take client-side action dependent on that:

var obj;
try {
    obj= new ActiveXObject('Control.ProgID');
} catch (e) {
    obj= null;
}
if (obj) {
    doActiveXEnhancedVersionOfPageThings();
}
bobince
That's what I thought. Thanks for your response.
AJ
A: 

What do I use for 'Control.ProgID' for my custom ActiveX control?

Ma99uS