I have read everything I can get my hands on about ViewState but can't seem to figure out what I'm doing wrong.
In a sub routine that first and foremost fills a grid, I set the value of two controls and then save those to view state:
ViewState.Item("SortKey") = SortKey.Value
ViewState.Item("RecId") = RecId.Value
I'm using ViewState because I can't seem to get the control values to persist.
On Page_Load I try to retrieve those values into the controls:
SortKey.Value = ViewState.Item("SortKey")
RecId.Value = ViewState.Item("RecId")
This does not work.
What am I missing?