I have a simple editor with a Gridview and a DetailsView. The Gridview handles DELETE and the DetailsView handles UPDATE and ADD. A panel around each one and some minor event handling is used to control which one is visible based on buttons pushed. I can do single operations, but I get an error when I click SELECT on the GRIDVIEW, then UPDATE on the DetailsView then SELECT on the Gridview again.
I will have to send the code in a follow-on message, but here are the error details.
Thanks.
[HttpException (0x80004005): Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.]
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +355
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Control.LoadChildViewStateByIndex(Ar rayList childState) +142
System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState) +303
System.Web.UI.Page.LoadAllState() +505
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2543