Steps for embedding a windows forms user control in web page(在网页中嵌入 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.
- 用于显示 opnefiledialog 的按钮
- 打开文件对话框
我已经在 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 窗体用户控件的步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在网页中嵌入 Windows 窗体用户控件的步骤


基础教程推荐
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01