ListView -Dynamic Controls and DataPager events
<p>I have a listView control which is bound to an object datasource.  In the ListView1_ItemDataBound event, I am generating some dynamic controls. I do this because depending on a particular column value, i might need to generate textbox, radio button, check box etc. </p>

<p>Some code here:</p>

<pre><code> ListViewDataItem item = (ListViewDataItem)e.Item;
typez = Convert.ToInt32(DataBinder.Eval(item.DataItem,"Type").ToString());
 if (typez == 1) //1 means generate radibutton
            {

               string[] options = DataBinder.Eval(item.DataItem, "QuestionDetail").ToString().Split(new string[] { delimiter }, StringSplitOptions.None);
                questionID = Convert.ToInt32(DataBinder.Eval(item.DataItem, "Question_ID").ToString());

                int optionCount = 1;
                RadioButtonList rbl = new RadioButtonList();

                //set ID for the radiobtnList to the questionid no.
                rbl.ID = "mcq_" + questionID;

                foreach (string s in options)
                {
                    //adds the MCQ options to list item
                    ListItem li = new ListItem(Util.GetAlphabet(optionCount).ToUpper() + ". " + s, Util.GetAlphabet(optionCount).ToUpper(), true);
                    rbl.Items.Add(li);

                    optionCount++;
                }
                //PlaceHolder PlaceHolder1 = (PlaceHolder)e.Item.FindControl("PlaceHolder1");

                PlaceHolder1.Controls.Add(rbl);
</code></pre>

<p>I have DataPager also. When I go to the next page I want to somehow capture the user response in the previous page. Otherwise, all the user response is lost.  I tried using ListView1_PagePropertiesChanging event. But here I somehow do not seem to get the dynamic controls in the page.</p>

<p>I need to get the radio button selected value so that I can save it or put in some session variable so that when user comes back to this page he can see his previuos values.</p>

<p>Could someone please suggest some insight on what I am doing wrong.</p>
