asp.net WebControl event order and ViewState
<p>I have a custom class creating a dropdownlist control as below:</p>

<pre><code>public class IHGridView : System.Web.UI.WebControls.WebControl
{
    private string _dataSource = "not set yet";

    public string DataSource
    {
        get { return _dataSource; }
        set { _dataSource = value; }
    }
}
</code></pre>

<p>EDIT:</p>

<pre><code>    protected override void OnInit(EventArgs e)
    {
        // VIewState is alive. When I select an option and submit, after postback it's selected value is the one I selected.
        this.Controls.Add(_dropDownList);
    }
</code></pre>

<p>or</p>

<pre><code>    protected override void CreateChildControls()
    {
        // VIewState is dead. When I select an option and submit, after postback it's selected value is the default one.
        this.Controls.Add(_dropDownList);
    }
</code></pre>

<p>So, now I come up with the result that I have to add control in "OnInit" void.
But, this "OnInit" is the first void that this class writes.
If I want to use a property like "DataSource" before, "OnInit" void...
How would I do that?</p>

<p>EDIT:</p>

<pre><code>    protected void Button1_Click(object sender, EventArgs e)
    {
        IHGridViewTest2.DataSource = "fired";
    }
</code></pre>

<p>DataSource is set when the button in aspx page is fired.</p>
