title: Properly implement a webpart with postback?
body: <p>What I'm trying to do is to create a webpart that has a textbox where you can set the value of a literal (h2) on the webpart and a "save" button that posts back and then sets the literal accordingly. This works with one huge caveat; when the page loads after the postback the literal has not been changed. However if I log what is actually set in the literal it has the new value. Also if I reload the page again (F5) it displays correctly. </p>
  
  <p>At first I figured it must be ViewState, so I disabled it for all controls. I verified that it is not being saved in the ViewState (decoded it). So ViewState is not saving the old value.</p>
  
  <p>I'm using "CreateChildControls" to add my controls to the webpart. and the postback is handled by a simple event handler.</p>
  
  <p>Any ideas?</p>
  
  <p>For the record, I'm using MOSS 2007.</p>