Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
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...
Posted
Comments
Sergey Alexandrovich Kryukov 13-Apr-11 2:02am    
"Showing me error that..."?
--SA

You cant add a Windows.Form Textbox. Use System.Web.UI.WebControls.TextBox or HTML input
 
Share this answer
 
Comments
Uday Kumar B R 13-Apr-11 2:31am    
Please follow the link
http://www.15seconds.com/issue/030610.htm
Sandeep Mewara 13-Apr-11 5:22am    
Counter voted.

ASP.NET question... how and why OP wants to add Winforms control.
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900