UpdateRegion not responding on initial callbacks. Only begins to respond after consecutive AJAX requests.


An IAjaxControl instance that requires ViewState to operate, (i.e. an UpdateRegion that has a ListBox within it) will not re-render correctly after its "update" method has been invoked until an operation has been performed on the control that causes the "Save" method of its StateStrategy to be invoked. The problem here lies in the fact that upon initial loading of the IAjaxControl instance (when !Page.IsPostBack), its state is not persisted to its configured medium (by default the DiskStateStrategy is assigned to all IAjaxControl instances which will persist state to the App_Data directory under the web application's root directory). So, until a .state file has been created for that instance of the IAjaxControl, all consecutive callbacks (invoked by either the "update" or "invoke" methods) will not find any state to load, and the "update" method will yield empty contents for the IAjaxControl. The most common symptom of this happening is when UpdateRegions are being invoked properly but their contents are empty when they are auto-updated in the client's browser.
A fix is already in place for this. Because this bug is breaking a primitive behavior of the framework, a new release will be forked.
Closed May 2, 2010 at 2:25 AM by peanutbutterlou


peanutbutterlou wrote May 2, 2010 at 2:24 AM

This has been fixed and the DiskStateStrategy and the JsonStateStrategy both persist their Control and ViewState upon initial load of an IAjaxControl control to their respective medium.

wrote May 2, 2010 at 2:25 AM

wrote Feb 13, 2013 at 2:48 AM

wrote May 15, 2013 at 11:25 PM