Click here to Skip to main content
15,896,207 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I would like to Get the controls placed in Panel by Programmatically can anybody help
Posted
Comments
Sandeep Mewara 11-Jun-12 5:51am    
Get controls where?

Further, are you talking of ASP.NET?

Hi,

Try the following.

Page.FindControl("ID of the control you want") and cast it based on the type of the control.

For example, if it is textbox, then do like this,
((TextBox)Page.FindControl("ID of the control you want"))

Happy Coding :)
 
Share this answer
 
Assuming you are using Windows Forms:
Look at the Controls property - it is a collection of all controls on the panel.
(MSDN documentation[^])
 
Share this answer
 
v2

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