开发者

.net 2.0 winform control in asp.net [closed]

It's difficult to tell what is being asked 开发者_如何转开发here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I want to use .net winform control in asp.net.I wrote the control and displays in asp.net.Is it necessary I have to create a package and deploy in client machine? or since .net framework available in client machine without package it will work.


While this is possible, by hosting a UserControl as Active-X - I generally don't recommend it for a variety of reasons:

  1. It's basically an Active-X control. There have been a lot of security concerns around this technology.
  2. It will only work in Internet Explorer. Internet Explorer has been hemorrhaging market share over the past few years.
  3. Generally it's possible to achieve what you want using JavaScript + HTML. What specific example can you think of where current web standards cannot solve it?

You can learn more about using a WinForm UserControl as an Active-X object here.

In reality, you are better off using browser-based technologies, such as HTML, JavaScript, SVG, etc. If that isn't good enough - then alternative technologies like Silverlight are a much better choice. It's cross-platform, more modern, and designed to run in the browser.


This blog explains how to do it, especially how to package the dll and deploy it (using gacutil).

And, obviously, you will have to have the .net framework on the client computer.

However, in the 2010's I'd would highly suggest you to use more manageable tools, like SilverLigth, Flash, or event Html + Javascript (jQuery is your friend)


You can not do what you are wanting to do. WinForms controls have no way to render as HTML.


You can't use a WinForms control in ASP.Net.

ASP.Net controls render to html on a webpage. WinForms controls run in a message loop on the client machine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜