hi
1) What properties ( if any ) do controls like GridView and TextBox save in control state? BTW - I assume these controls have their control state enabled by default?!
2) Control needs to call Page.RegisterRequiresControlState ( during Init event ) in order to signal that its control state needs to be persisted.
Assuming control A (A is of type WebControl2) needs to save its control state and that A is contained inside control B ( B is of type WebControl1 ) --> I was able to register A’s control state by overriding B’s OnInit method:
protected override void OnInit(EventArgs e)
{
Control control= this.FindControl("A");
Page.RegisterRequiresControlState(control);
base.OnInit(e);
}
Is this considered a bad programming practice?
thanx