Precautions for Using Client ActiveX controls in ASP. NET

Source: Internet
Author: User

Case: ActiveX control made by ASP. NET + VB
Operating System: Windows2003 + SP1

Symptom 1: Pass
<Object classid = "CLSID: 132a80f5-f1d1-4549-b70d-1473b854a938" id = "uchello" viewastext>
</Object>
After the control is inserted, the control can be displayed normally.

Symptom 2:
<Script language = "VBScript">
Document. getelementbyid ("uchello"). Caption = "Please click button"
Sub myclick ()
Document. getelementbyid ("uchello"). Caption = "Lifei I love you"
End sub
</SCRIPT>
ProgramDuring running, a script error is always reported and the object does not exist.

Symptom 3:
View the source file from IE and save the file as a static html page to the local device for error detection. The page is displayed normally and the script runs normally.

Symptom 4:
When you access a static page through HTTP, the page is not displayed normally. A script error is returned.

After analysis, we can see that both static and dynamic pages are accessed in http mode, and errors are reported. In this way, the ASP. NET issue can be ruled out, so it is suspected that the problem is caused by Internet Explorer settings.

Finally, set ie as follows:


The system runs normally.

I initially thought it was a problem with Asp.net and found a lot on Google.ArticleBut they are not clear, but the problem of Asp.net is ruled out through symptom 4. Therefore, in the future development of BS + ActiveX controls, we should consider the problem of IE settings in windows. Because the control in the development stage cannot be digitally signed, we should not influence development because of this details.

BTW: I thought it was a problem with Asp.net, which wasted a lot of time and dizzy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.