简体   繁体   中英

Hosting a winforms user control in asp.net web page

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 .

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM