为什么我的用户控件无法在aspx页面中工作 [英] why my user control is not working in aspx page

查看:77
本文介绍了为什么我的用户控件无法在aspx页面中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了Windows用户控件,我在网页上使用它,但是当我在网页上使用这一行时,由于未指定控件类型,它给出了错误。



< object id =Object1classid =http:WindowsFormsControlLibrary1.dll #WindowsFormsControlLibrary1.UserControl1

height =70width =350/>



你可以帮忙吗?

i have created windows user control and i am using it on web page, but when i use this line on web page it gives me error as a control type was not specified.

<object id="Object1" classid="http:WindowsFormsControlLibrary1.dll#WindowsFormsControlLibrary1.UserControl1"
height="70" width="350"/>

can u please help??

推荐答案

引用:

我创建了Windows用户控件,我在网页上使用它

i have created windows user control and i am using it on web page

你不能。而是创建一个Web UserControl 并将其包含在网页中。您正在混合 Windows Web App ,这是不可能的。



参考 - ASP.NET用户控件 [ ^ ]。

You can't. Instead create a Web UserControl and include that in Web Page. You are mixing Windows and Web App, which is not possible.

Refer - ASP.NET User Controls[^].


通过添加WindowsUsercontrol dll检查UserControl引用是否正确。



参考

http://weblogs.asp.net/spano/archive/2007/09 /19/hosting-a-windows-form-control-in-a-web-page.aspx [ ^ ]



http://www.beansoftware。 COM / ASP.NET - 教程/播放ce-Windows-Control-To-Web-Form.aspx [ ^ ]
Check the UserControl references are proper by adding the WindowsUsercontrol dll.

Refer
http://weblogs.asp.net/spano/archive/2007/09/19/hosting-a-windows-form-control-in-a-web-page.aspx[^]

http://www.beansoftware.com/ASP.NET-Tutorials/Place-Windows-Control-To-Web-Form.aspx[^]


这篇关于为什么我的用户控件无法在aspx页面中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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