[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

r.vries

12/26/2007 9:51:00 AM

Hi,

I'm just starting with asp.net and created a toolbar (custom) control.

Everything works fine but when I do a postback a pushed button gets
'the 'unpushed' state...

I'm using LoadControlState and SaveControlState but the events aren't
fired in the order I thought they would.

Postback occured
-LoadControlState fired
-SaveControlState fired

This explains why my button loses its state after a postback.

But why is the state loaded before it is saved?

Best regards,
Ron
2 Answers

r.vries

12/26/2007 8:26:00 PM

0

ps. I solved 'the pushed button' issue with a hidden field, so I'm not
looking for a solution. :-)
But I'm just a bit confused by the behaviour of saving and loading the
controlstate.

Teemu Keiski

1/14/2008 6:56:00 PM

0

Hi,

control state is saved initially on the first request when you load the
page. Then on postback, it is first loaded back (on the server) , used in
the process of dealing with the request (in respect to the control), and
then again finally saved for the next postback (containing possible
changes).

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice....
http://teemu...

"r.vries" <r.vries@gmail.com> wrote in message
news:9c54fd1a-b2a7-4068-b62e-d0b2af91ecee@i12g2000prf.googlegroups.com...
> ps. I solved 'the pushed button' issue with a hidden field, so I'm not
> looking for a solution. :-)
> But I'm just a bit confused by the behaviour of saving and loading the
> controlstate.