When we create ASP controls at runtime, the fresh instances created are available in the current scope only. In the next page postback they are lost.That means we loose the controls and they are no longer existing in the page now. Now if we try to find the control's ID then we get error.
There are many ways to solve this problem. Some of them are:
1. We can create them in "OnInit" method as it is always called before Page_Load. So we will be able to get the instances for the controls.
2. If you are creating control in any Button_Click event, then we need to recreate those on every page_Load. For that we can keep the number of controls to be created in Viewstate.