Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,

I have user control and i have a panel.

and i want to add user control inside a panel.

in windows applications.
is that possible.


Regards,
Nagaraju.N
Posted

Panel_Name.Controls.Clear();<br />
User_Control Usr_Ctrl = new User_Control();<br />
Panel_Name.Controls.Add(Usr_Ctrl);
 
Share this answer
 
is that possible.
Yes, possible.

Panel is just a container. You can keep any type and count of controls in it.
 
Share this answer
 
v2
Comments
Nuri Ismail 7-Apr-11 11:26am    
Right, my 5.
avigodse 7-Apr-11 11:32am    
Yes, agree with Sandeep, and just exclude Windows Form from that list.
Kim Togo 7-Apr-11 13:00pm    
Correct :-)
Albin Abel 8-Apr-11 9:58am    
sharp 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