Why dropdownlist values is persisted with isPostBack and not DataTable which contains that list?
<p>I have DataTable which feeds a dropdown list. The values of this dropdown persist when I click on the button whereas the datatable which feeds the list is null at next page reload. I need that this dataTable to also persist like its associated control so isn't there anything that asp.net has in its tricks bag to behave like for controls but for private members instead ?</p>

<pre><code>public partial class _Default : System.Web.UI.Page
{
    private DataTable m_DataTable = new DataTable();

    private void f(String x, String y){
        // some function of x,y
    }

    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            m_DataTable.Columns.Add("Title");
            m_DataTable.Columns.Add("x");
            m_DataTable.Columns.Add("y");

            m_DataTable.Rows.Add("place1", "1", "2");
            m_DataTable.Rows.Add("place2", "3", "4");


            int nTotalRecords = m_DataTable.Rows.Count;
            for (int i = 0; i &lt; nTotalRecords; i++)
            {
                DropDownList1.Items.Add(m_DataTable.Rows[i]["Title"].ToString());
            }


            DataRow[] dataRowArray = m_DataTable.Select("[Title]='place1'");
            String x = dataRowArray[0]["x"].ToString();
            String y = dataRowArray[0]["y"].ToString();

            f(x, y);

        }


    }


    protected void ButtonGo_Click(object sender, EventArgs e)
    {
        // this code will crash because m_DataTable is emptied when page reloads
        DataRow[] dataRowArray = m_DataTable.Select("[Title]='place2'");
        String x = dataRowArray[0]["x"].ToString();
        String y = dataRowArray[0]["y"].ToString();
        f(x, y);
    }
}
</code></pre>

<p>Update: I heard that asp.net paradigm was to be as close as possible as desktop. Why does  it create a new instance for the page instead of keeping it ? Why does it keep the same state for controls and not for private members that is incoherent isn't it?</p>
