在asp.net网页中托管winforms用户控件
我正在尝试在网页中托管现有的 win-forms 用户控件。我正在按照链接中建议的步骤进行操作 https://web.archive.org/web/20210619191631/https://www.4guysfromrolla.com/articles/052604-1.aspx。
总结一下内联 -
该示例创建一个 Windows 控件库项目并使用对象标记在网页中托管控件,
<OBJECT id="MyWinControl1" height="200" width="200" classid="http:WinControls.dll#WinControls.WinTreeview" VIEWASTEXT>
<PARAM NAME="Title" VALUE="My Title">
</OBJECT>
我尝试了他们提供的内联示例,它工作得很好。尝试创建我自己的控件,只要我使用简单的控件(复选框、单选按钮等),它似乎就可以正常工作。但是,一旦我开始使用更复杂的控件(例如报表查看器)(我尝试托管的实际控件也有同样的问题),控件就会停止渲染。我看到一个空框,左上角控件有一个图像。
我不确定问题是什么以及如何调试这个问题。
I am trying to host an existing win-forms usercontrol in a webpage. I am following the steps as sugested in the link https://web.archive.org/web/20210619191631/https://www.4guysfromrolla.com/articles/052604-1.aspx.
To summarize inline -
the sample creates a windows control library project and uses the object tag to host the control in a web page
<OBJECT id="MyWinControl1" height="200" width="200" classid="http:WinControls.dll#WinControls.WinTreeview" VIEWASTEXT>
<PARAM NAME="Title" VALUE="My Title">
</OBJECT>
i tried the sample they had provided inline and it worked fine. Tried creating my own controls and as long as i used simple controls (check box, radio button etc) it seemed to work fine. But once i started using more complex controls like a report viewer(the actual control i am trying to host also has the same issue) the control stopped rendering. I see a empty box with a image at the top left control.
I am not sure what the problem is and how i can debug this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用过 wpf xbap,它基本上是一个带有 Windows 应用程序主机控件的 wpf 浏览器应用程序。
然后,您可以使用证书发布您的应用程序,然后需要将该证书导入到您的浏览器中,然后就可以开始了。
检查此 链接了解更多信息
I have used wpf xbap, its basically a wpf browser application with a windows application host control.
you can then publish your application with a certificate that then needs to be imported into your browser and your good to go.
Check this link for more info