I am trying to get solution for below problem. Please help.Page 1: To add a record in to DB. At this page, as per the user requests , few controls will be added to the page from server side code.one of them is checkbox list.and when user is requesting to save data, its going to the DB.Everything is fine upto now.Page 2: To edit the record which is entered from page no 1. When user requests to edit the record entered at page no 1, i'm redirecting user to this update page, with record id, and generating the required controls to show the values.Now the main problem is :When page is loading first time , I m creating the required controls and then assigning the values to them to edit.but after that at each postback, the value of datasource of checkboxlist is becoming null, same case is with the label control.but the value of textbox is same, it is not becoming empty at each postback.In code : In code i have created two method to generate controls.1st is : to create new controls, and to assign values to them2nd is : to regenerate the controls at each postback, with the same IDs, but not assigning any value here.I think viewstate will reload the values of respective controls, if IDs are same.So , what should i do here?
View Complete Post