托管在asp.net网页中的WinForms用户控件 [英] Hosting a winforms user control in asp.net web page
问题描述
我想举办一个现有的双赢,形成用户控件的网页。我下面的步骤sugested在链接 http://www.4guysfromrolla.com/articles /052604-1.aspx 。
I am trying to host an existing win-forms usercontrol in a webpage. I am following the steps as sugested in the link http://www.4guysfromrolla.com/articles/052604-1.aspx.
要总结在线 -
样品创建一个Windows控件库项目和使用对象标记来承载在网页中控制
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.
推荐答案
我已经使用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.
勾选此<一个href="http://blogs.microsoft.co.il/blogs/maxim/archive/2008/03/05/wpf-xbap-as-full-trust-application.aspx"相对=nofollow>了解更多信息链接
这篇关于托管在asp.net网页中的WinForms用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!