Wednesday, March 21, 2012

LoadControlState event not firing in update panel.

I have a link which is wrapped in a update panel. This link works as an expand/collapse link. The expand/collapse status of the link is saved in the control state. But i found that the LoadControlState event does not fire but the SaveControlState does. Because of this, i always get the expand/collapse state of the link as Collapsed which is default. I am kind of stuck on this now. I dont want to use session as it does not sound like a session wide data. I tried using hidden variables but even that does not work with ajax because Request.Form always has old value.

The reason i want to use control state and not viewstate is becasue i want to disable the viewstate on this page.

Any help is much appreciated.

Nilesh

Hi Nilesh,

I tried using hidden variables but even that does not work with ajax because Request.Form always has old value.

What you mean?

If you want to store something,you can store them in javascript variables.

Please check this:http://forums.asp.net/p/1134520/1813803.aspx#1813803

it store the scrollLeft/scrollTop in javascript variables.

Best Regards.

No comments:

Post a Comment