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 窗体用户控件的步骤
基础教程推荐
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- WPF 模态进度窗口 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
