Viewstate not saving

  • Thread starter Thread starter Erica
  • Start date Start date
E

Erica

I have used the following code in numerous apps to save viewstate. And now
(all of the sudden) it isn't working. In prerender I save an array into
viewstate:

With CommRptCriteria
arrRptViewState(0) = .CurrentControlName
arrRptViewState(1) = .CycleID
arrRptViewState(2) = .BeginDate
arrRptViewState(3) = .EndDate
arrRptViewState(4) = .RepID
arrRptViewState(5) = .Assignee
arrRptViewState(6) = .Sponsor
arrRptViewState(7) = .RevType
arrRptViewState(8) = .SortDirection
arrRptViewState(9) = .SortExpression
End With

Me.ViewState.Add("InvRptCriteria", arrRptViewState)


Then in Page Initialization I try to load the viewstate:

InvRptViewState = Me.ViewState("InvRptCriteria")

InvRptViewState is a public array.
 
I made a mistake when copying my code over. InvRptViewState is really
arrRptViewState....
 
Back
Top