Keywords: Asp.net 2.0, ie, winform, ocx, ActiveX,Control Interaction, DOTNETInteroperability, ComInteroperability
Running environment:. Net framework2.0,
Development Environment:Visual Studio 2005(Winform2.0, ASP. net2.0)
In many cases, we haveAsp.netEmbedded some desktop controls, suchWin32 ocx (ActiveX)Control,DOTNET winformControl. Here, we will briefly describe some problems encountered in the application.
1.OCXControl inAsp.net 1.xYou can drag it from the toolbarWebformUse on the page. During the design, the page can display a specific visual effect. AvailableJavascript.
2.OCXControl inAsp.net 2.0The following cannot be dragged from the toolbarWebform. The toolbar icon is unavailable in gray. Therefore, we must manually modifyHtmlView, embedded in itObjectElement, syntax andAsp.net 1.xSame. In this caseWebformThe page does not show the actual design effect of the control, but only shows a box, representingOCXWidget size.
3.SimpleWinformControl inAsp.net 1.x, Asp.net 2.0The following cannot be dragged from the toolbar.Webform. The toolbar icon is unavailable in gray. Therefore, we must manually modifyHtmlView, embedded in itObjectElement, syntax andAsp.net 1.xSame. In this caseWebformThe page does not show the actual design effect of the control, but only shows a box, representingOCXWidget size. Only when running can we see the real effect.
In this caseOCXInAsp.net 2.0.
The simple definition above is that the control only contains the basic(Built-in System) WinformControl, not includedWin32 OCXControl.
4.Complex controlsAsp.net 1.x, Asp.net 2.0None of the following can be used directly.CodeNo.
The simple definition above is that the control containsWin32 OCXControl.
5.ForAsp.netHybrid useWin32 OCXControls andDOTNET winformControl, a feasible approach is:
A)InWindowsIn the user controlOCXAttachWinform.Win32AndDOTNETInteractive operations are supported.
B)InAsp.netPlayingWinformUser Control packageAsp.net WebUser Control. InAsp.net 1.xInAsp.net 2.0Only code can be used.
C)SetAsp.netUse on the pageWebUser Control.
6.A problem not completely solved:WinformControl andJavascriptInteraction. Interaction refersWinformAndJavascriptMutual attribute and event calls. I have never succeeded as I said on the Internet.
7.If you have any questions or suggestions, I hope you will discuss them more.