Tracking state using ASP.NET AJAX / ICallbackEventHandler Tracking state using ASP.NET AJAX / ICallbackEventHandler ajax ajax

Tracking state using ASP.NET AJAX / ICallbackEventHandler


If you're already shuffling the ViewState around anyway, you might as well use an UpdatePanel. Its partial postbacks will update the page's ViewState automatically.


Check out this blog post: Tweaking the ICallbackEventHandler and Viewstate. The author seems to be addressing the very situation that you are experiencing:

So when using ICallbackEventHandler you have two obstacles to overcome to have updated state management for callbacks. First is the problem of the read-only viewstate. The other is actually registering the changes the user has made to the page before triggering the callback.

See the blog post for his suggestions on how to solve this. Also check out this forum post which discusses the same problem as well.


I actually found both of those links you provided, but as noted they are simply describing the problem, not solving it. The author of the blog post suggests a workaround by using a different ViewState provider, but unfortunately that isn't a possibility in this case...I really need to leave the particulars of the ViewState alone and just hook on to what is being done out-of-the-box.