Viewstate not saving

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.
 
E

Erica

I made a mistake when copying my code over. InvRptViewState is really
arrRptViewState....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top