G
george d lake
Hi, I have a structure that I need to save between pages. Can not use
sessions. I would love to use ViewState, but, I get this error!
The type 'TicketSystemV2.ucTicketList+OrderBy' must be marked as
Serializable or have a TypeConverter other than ReferenceConverter to be put
in viewstate.
Here is my code:
Public Structure OrderBy
Public DateSort As Boolean
Public SortDir As String
Public SeveritySort As Boolean
Public AssignedToSort As Boolean
Public OfficeSort As Boolean
Public ProblemSort As Boolean
Public TimeSort As Boolean
End Structure
In the page load:
Dim pOrderBy As New OrderBy()
pOrderBy.DateSort = True
pOrderBy.SortDir = "D"
pOrderBy.SeveritySort = False
pOrderBy.AssignedToSort = False
pOrderBy.OfficeSort = False
pOrderBy.ProblemSort = False
pOrderBy.TimeSort = False
ViewState.Add("bla", pOrderBy)
The error message happens once all the code has been executed and the page
is acutally loading.
Any ideas?
sessions. I would love to use ViewState, but, I get this error!
The type 'TicketSystemV2.ucTicketList+OrderBy' must be marked as
Serializable or have a TypeConverter other than ReferenceConverter to be put
in viewstate.
Here is my code:
Public Structure OrderBy
Public DateSort As Boolean
Public SortDir As String
Public SeveritySort As Boolean
Public AssignedToSort As Boolean
Public OfficeSort As Boolean
Public ProblemSort As Boolean
Public TimeSort As Boolean
End Structure
In the page load:
Dim pOrderBy As New OrderBy()
pOrderBy.DateSort = True
pOrderBy.SortDir = "D"
pOrderBy.SeveritySort = False
pOrderBy.AssignedToSort = False
pOrderBy.OfficeSort = False
pOrderBy.ProblemSort = False
pOrderBy.TimeSort = False
ViewState.Add("bla", pOrderBy)
The error message happens once all the code has been executed and the page
is acutally loading.
Any ideas?