AJAX Page - Knowledge Base

« Back to Knowledge Base list

ViewState issue with CallbackPanel

Q:

When I use the Update Panel in a page of my ASP.NET project, It seems to lose the ViewState of all the ASP.NET controls when I make a server request.

What could be happening?

A:

When using CallbackPanel you need to set "EnableCallbackViewstate" property to "true" in page directive to enable ViewState in page. Check this sample to see how it works: http://www.obout.com/AJAXPage/ex_callbackviewstate.aspx

You can find the source code from file: oboutSuite/AjaxPage/aspnet_callbackviewstate.aspx