Is ViewState forgetting something?
Sometimes when you develop an ASP.Net custom control you might get stumped as to why the values you input are not being persisted through postbacks. The problem usually is that you didn’t follow the “pattern” to correctly hook up with the ASP.Net page architecture.
View state recording starts once you add the control to the Controls collection. This is typically done in the CreateChildControls method. However, this method isn’t to be called directly by your code instead you call EnsureChildControls at some point in the page life cycle early enough to persist your viewstate. I find this works well enough:
protected override void OnLoad(EventArgs e)