如何在ASP.net页面面板控件中添加Windows.form.TextBox [英] How to add Windows.form.TextBox in ASP.net page Panel Control

查看:225
本文介绍了如何在ASP.net页面面板控件中添加Windows.form.TextBox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我想让过程在Panel ASP.net页面控件中添加Windows.form.TextBox,因为我已经声明了文本框System.Windows.Forms.TextBox txt_TextToBeSearched = new System.Windows.Forms.TextBox();

我想在运行时添加它
作为

Panel1.Controls.Add(txt_TextToBeSearched);


但向我显示添加Web.UI.WebControl的错误

在此先感谢...

Hi Everyone,
I want Procedure to add Windows.form.TextBox in Panel ASP.net page Control as I have alredy declared text box System.Windows.Forms.TextBox txt_TextToBeSearched = new System.Windows.Forms.TextBox();

I want to add it at the run time
as

Panel1.Controls.Add(txt_TextToBeSearched);


but showing me error that to add Web.UI.WebControl

Thanks in advance...

推荐答案

您无法添加Windows.Form文本框.使用System.Web.UI.WebControls.TextBox或HTML输入
You cant add a Windows.Form Textbox. Use System.Web.UI.WebControls.TextBox or HTML input


http://www.15seconds.com/issue/030610.htm
你看到了吗?它说:在IE中托管.NET Windows窗体控件"

您如何将其假定为ASP.NET项目,并基于所有尝试创建Winforms文本框并将其放置在ASP.NET面板中的方法?

Article是创建一个winforms控件并将其托管在IE中进行查看.请阅读该文章,然后再次阅读.
http://www.15seconds.com/issue/030610.htm
Did you look at that? It says: "Hosting .NET Windows Forms Controls in IE"

How did you assumed it as a ASP.NET project and based on all trying to create a winforms textbox and place it in a ASP.NET Panel?

Article was to create a winforms control and host it in IE to view. Please read the article and go through it again.


这篇关于如何在ASP.net页面面板控件中添加Windows.form.TextBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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