在网页中嵌入 Windows 窗体用户控件的步骤 [英] Steps for embedding a windows forms user control in web page

查看:24
本文介绍了在网页中嵌入 Windows 窗体用户控件的步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Visual Studio 2005 中开发一个 Windows 窗体用户控件.它是一个文件上传控件,仅使用 2 个元素.

I am developing a windows forms user control in Visual Studio 2005. It is a file upload control and uses only 2 elements.

  1. 用于显示 opnefiledialog 的按钮
  2. 打开文件对话框

我已经在 html 页面中添加了一个带有类 ID 和所有内容的对象标签.

I have added an object tag to the html page with the class id and all that.

<OBJECT id="myControl1" name="myControl1" classid="ActiveXUploadFile.dll#ActiveXUploadFile.FileUpload" width=288 height=300></OBJECT>

命名空间是 ActiveXUploadFile,类名是 FileUpload.

The namespace is ActiveXUploadFile and class name is FileUpload.

但是网页中没有显示控件.

But the control is not displayed in the web page.

还有什么要做的吗?

谢谢

推荐答案

提供classid属性的完整url

Provide the complete url for the classid attribute

例如:classid="http://localhost/FirstServiceTestForm.dll#TestForm.myControl"

ex: classid="http://localhost/FirstServiceTestForm.dll#TestForm.myControl"

这篇关于在网页中嵌入 Windows 窗体用户控件的步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆