title: ASP.Net Life Cycle And Control State And View State
body: <p>In msdn , they mentioned as, view state values is loaded between page_init and page_initcomplete. Lets us assume , during the get request I am assigning a value to text property of text box as get with in <code>page_load () { if(!IsPostBack) {textobx.text="get";}}</code>  . So this get value is stored in viewstate and visible in browser. And during my next postback I am assigning a post value to same text property in <code>page_init</code>  event . So as per msdn , after <code>page_initcomplete</code> event this post value must be override by the get value . But it doesn't happen that way . Why ?</p>
  
  <pre><code>   protected void Page_Load(object sender, EventArgs e)
      {
          if (!IsPostBack)
          {
              TextBox1.Text = "hello";
          }
          TextBox2.Text = TextBox1.Text.ToString();
  
      }
      protected override void OnPreInit(EventArgs e)
      {
              base.OnPreInit(e);
              TextBox1.Text = "init";
      }
      protected override void OnInitComplete(EventArgs e)
      {
              base.OnInitComplete(e);
              TextBox1.Text = "init";
  
      }
  </code></pre>
  
  <p>First time the value is hello in <code>Textbox2.Text</code> this is fine . But during post back I am expecting init value on <code>textbox2.text</code> . But it is still hello. why ?</p>