Using Windows Forms Controls in Internet Explorer
http://www.gotdotnet.com/team/windowsforms/iesourcing.aspx

解决方案 »

  1.   

    给你个简单的例子吧!
    定义一个自定义控件,myControl
    ...
    namespace myControl{
       public class Helloworld :Control{
          protect override void Render(HtmlTextWriter output){
             output.Write("<Center>HelloWorld!</Center>");
          }
      }
    }使用该控件.
    <% Register TagPrefix="myControl" Namespace="myControl" Assembly="myControl" %>
       <html>
          <body>
             <form method="POST" action="Simple.aspx" runat=server>
                <myControl:HelloWorld id="MyControl1" runat=server/>
             </form>
          </body>
       </html>
      

  2.   

    我找到了一个例子类似:<object id="simpleControl1"classid="http:SimpleControl.dll#Microsoft.Samples.WinForms.Cs.SimpleControl.SimpleControl"
    height="300" width="300" VIEWASTEXT>
    <param name="Text" value="Simple Control">
    </object>
    但要求该 HTML 页必须驻留在 Web 服务器上的 IIS 虚拟目录中,而且必须具有相应的权限。
    难道不在Web 服务器上的 IIS 虚拟目录中就不行吗??