I am trying to dynamically create controls and give them properties during run time.
I have put my code inside the Page_Init event, when I run my website I can see m
As FindControl is not recursive, you have to replace this code :
Label FeedbackLabel = (Label)FindControl("FeedbackLabel");
TextBox InputTextBox = (TextBox)FindControl("InputTextBox");
by this code :
Label FeedbackLabel = (Label)Panel1.FindControl("FeedbackLabel");
TextBox InputTextBox = (TextBox)Panel1.FindControl("InputTextBox");
However, according other answers, you should move the declaration (not the instantiation) outside the method (at class level) in order to easily get an entry for your controls.