开发者

How to embed 32 or 64 bit ActiveX control on same page depending on browser?

开发者 https://www.devze.com 2023-02-18 20:19 出处:网络
I have an ActiveX control that has both 32 and 64 bit versions for 32 and 64 bit browsers.At run time, I can detect the browser version and redirect to a copied deployment of the same pages, but 开发者

I have an ActiveX control that has both 32 and 64 bit versions for 32 and 64 bit browsers. At run time, I can detect the browser version and redirect to a copied deployment of the same pages, but 开发者_如何转开发referencing the 64-bit code base. Is there any way to have a single set of pages but change the referenced code base file (.cab file) at run time based on browser? This is in Visual Studio ASP.NET, with the control embedded in a form at design time.


This is client side, you should be able to use that code in any IE supporting ActiveX:

<script language="javascript"><!--
var cab_to_download = "http://server/activex." +
window.navigator.cpuClass + ".cab";
--></script>

you would have to name your CABs 'activex.x86.cab' and 'activex.x64.cab' in the sample, and use that for your codebase="" attribute with some document.write() call in client side.

0

精彩评论

暂无评论...
验证码 换一张
取 消