Author: pizzaboy | Posted on: 8/24/2009 11:53:57 PM | Views : 303

I'm trying to save and persist some properties for my user control so I don't have to re-assign them on every page postback. The problem I'm having is that both of the LoadControlState and SaveControlState routines work without prompting any errors but I keep on getting directed to an page error occurred?
Protected Overrides Sub OnInit(ByVal e As EventArgs) MyBase.OnInit(e) Page.RegisterRequiresControlState(Me) End Sub Protected Overrides Function SaveControlState() As Object Dim state() As Object = New Object(1) {} If (mPanel IsNot Nothing) Then state(0) = MyBase.SaveControlState() state(1) = mPanel End If Return state End Function Protected Overrides Sub LoadControlState(ByVal savedstate As Object) If (savedstate IsNot Nothing) Then ...

Go to the complete details ...