Jun 5, 2008

Failed to load viewstate

The exception occurs because the viewstate of the page must be restored to its previous state. This mean we need to re-load any control we loaded dynamically before the page load had being triggered.

Solution :
I was able to get it working by setting the PlaceHolder that I was dynamically adding the control to EnableViewState="False".
Set EnableViewStage=”false” in Page Directive