How to retrieve server control's values place inside user control after post back
<p>I have user control placed in my .aspx page. User controls are added dynamically on button click event. My problem is, after post back, I can retrieve server controls placed inside user control but cant retrieve their values.</p>

<p>Here is the code of my user control's .ascx page</p>

<pre><code>   &lt;%@ Control Language="C#" AutoEventWireup="true"   odeFile="qualificationControl.ascx.cs" Inherits="qualificationControl" %&gt;
                    &lt;table width="100%"&gt;
                        &lt;tr&gt;
                            &lt;td class="RowHeight" width="20%"&gt;
                                Course Name&lt;/td&gt;
                            &lt;td width="20%"&gt;
                                &lt;asp:DropDownList ID="courseList" runat="server" Width="100px"&gt;
                                &lt;/asp:DropDownList&gt;
                            &lt;/td&gt;
                            &lt;td width="20%"&gt;
                                Year of Passing&lt;/td&gt;
                            &lt;td width="*"&gt;
                                &lt;asp:DropDownList ID="yearList" runat="server" Width="100px"&gt;
                                    &lt;asp:ListItem Value="0"&gt;2005&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem Value="1"&gt;2006&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem Value="2"&gt;2007&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem Value="3"&gt;2008&lt;/asp:ListItem&gt;
                                    &lt;asp:ListItem Value="4"&gt;2009&lt;/asp:ListItem&gt;
                                &lt;/asp:DropDownList&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td class="RowHeight" width="20%"&gt;
                                Percentage&lt;/td&gt;
                            &lt;td colspan="3"&gt;
                                &lt;asp:TextBox ID="percentageBox" runat="server"&gt;   &lt;/asp:TextBox&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;tr&gt;
                            &lt;td class="RowHeight" width="20%"&gt;
                                Instutitute Name&lt;/td&gt;
                            &lt;td colspan="3"&gt;
                                &lt;asp:TextBox ID="InstiNameBox" runat="server" Width="350px"&gt;&lt;/asp:TextBox&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
</code></pre>

<p>Here is the code of my .axcs.cs page</p>

<pre><code>    using System;
     using System.Collections.Generic;
     using System.Linq;
     using System.Web;
     using System.Web.UI;
     using System.Web.UI.WebControls;
     using System.Data;

    public partial class qualificationControl : System.Web.UI.UserControl
    {
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            using (DataOperation oDo = new DataOperation())
            {
                DataTable dt = oDo.DropDownList("select * from tblqualificationMaster");
                foreach (DataRow row in dt.Rows)
                {
                    courseList.Items.Add(new ListItem(row[1].ToString(), row[0].ToString()));
                }
            }
        }
        catch (Exception ex)
        {
            throw;
        }
    }
}
</code></pre>

<p>Code of my .aspx page</p>

<pre><code>&lt;%@ Page Title="Application Form Level2" Language="C#" MasterPageFile="~/AppMaster.master" AutoEventWireup="true" CodeFile="AppplicationForm2.aspx.cs" Inherits="AppplicationForm2" %&gt;

&lt;%@ Register src="Control/qualificationControl.ascx" tagname="qualificationControl" tagprefix="uc1" %&gt;

&lt;asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"&gt;
&lt;/asp:Content&gt;
&lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"&gt;

&lt;table width="100%"&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &amp;nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td class="SubTitle"&gt;
            Education details:&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td runat="server" id="tdQualificationn"&gt;

            &lt;%--&lt;uc1:qualificationControl ID="qualificationControl1" runat="server" /&gt;--%&gt;
            &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
                &lt;ContentTemplate&gt;
                   &lt;asp:PlaceHolder ID="UserCtrlHolder" runat="server"&gt;&lt;/asp:PlaceHolder&gt;
                &lt;/ContentTemplate&gt;

           &lt;%-- &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID="addQualificationBtn" /&gt;&lt;/Triggers&gt;--%&gt;&lt;/asp:UpdatePanel&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td align="center"&gt;
            &lt;asp:Button ID="addQualificationBtn" runat="server" 
                Text="Add More Qualifications" Height="40px" 
                onclick="addQualificationBtn_Click" /&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;/asp:Content&gt;
</code></pre>

<p>Code of my .aspx.cs page</p>

<pre><code>    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Collections;

    public partial class AppplicationForm2 : System.Web.UI.Page
    {
        Control qualificationControl;
        UserControl usrqualificationControl = new UserControl();
    int CtrlID = 0;
    ArrayList CtrlList = new ArrayList();
    protected void Page_Load(object sender, EventArgs e)
    {
        qualificationControl = usrqualificationControl.LoadControl("~/control/qualificationControl.ascx");
        if (!IsPostBack)
        {
            ArrayList CtrlList = new ArrayList();
            qualificationControl.ID = CtrlID.ToString();
            UserCtrlHolder.Controls.Add(qualificationControl);
            CtrlList.Add(qualificationControl);
            Session.Add("qualiControl", CtrlList);
            Session.Add("ControlHolder", UserCtrlHolder);
        }
    }
    protected void addQualificationBtn_Click(object sender, EventArgs e)
    {
        RememeberOldValues();
        if (Session["QualiControl"] != null)
        {
            CtrlList = (ArrayList)Session["qualicontrol"];
        }
        qualificationControl.ID = CtrlList.Count.ToString();
        CtrlList.Add(qualificationControl);
        for (int i = 0; i &lt; CtrlList.Count; i++)
        {
            UserCtrlHolder.Controls.Add((Control)CtrlList[i]);
        }
    }    
    public void RememeberOldValues()
    {
        try
        {
            if (Session["ControlHolder"] != null)
                {
                    ArrayList CourseList = new ArrayList();
                    ArrayList YearList = new ArrayList();
                    ArrayList percentageList = new ArrayList();
                    ArrayList InstituteList = new ArrayList();
                    ArrayList CtrlList = (ArrayList)Session["qualicontrol"];
                    PlaceHolder PlaceHolder = (PlaceHolder)Session["ControlHolder"];
                    for (int intListCnt = 0; intListCnt &lt; CtrlList.Count; intListCnt++)
                    {
                        Control userControl = (Control)PlaceHolder.FindControl(CtrlID.ToString());
                        DropDownList dlCourseList = (DropDownList)userControl.FindControl("courseList");
                        DropDownList dlYearList = (DropDownList)userControl.FindControl("yearList");
                        TextBox percentageBox = (TextBox)userControl.FindControl("percentageBox");
                        TextBox InstiNameBox = (TextBox)userControl.FindControl("InstiNameBox");

                        CourseList.Add(dlCourseList.SelectedValue);
                        YearList.Add(dlYearList.SelectedValue);
                        percentageList.Add(percentageBox.Text);
                        InstituteList.Add(InstiNameBox.Text);
                    }
                }
        }
        catch (Exception ex)
        {
           throw;
        }
    }
}
</code></pre>

<p>Please guide me how can I retrieve those values.</p>
