I'm building a webcontrol, and I want to implement the COntrolState.
Despite I've followed the MSDN sample, and checked with a lot of post
over the net, the LoadControlState(object state) event won't be never
fired.
I don't understand why.
this is the method call I do
protected override void LoadControlState(object state)
{
if (state != null)
.....
and the OnInit is like this
protected override void OnInit(EventArgs e)
{
Page.RegisterRequiresControlState(this);
base.OnInit(e);
}
I've tried to swith the RegisterRequiresControlState up or down without take
effects.
My code will run over the Save method but never reload data ... What's is
the matter
Every post I've found wasn't unsolved.
Thanks for any suggestion.
Andrea
Brock Allen - 07 Jun 2006 00:51 GMT
LoadControlState will only get called if there's a postback. Is a post back
occuring on your page?
-Brock
http://staff.develop.com/ballen
> I'm building a webcontrol, and I want to implement the COntrolState.
> Despite I've followed the MSDN sample, and checked with a lot of post
[quoted text clipped - 27 lines]
>
> Andrea