G
Guest
I have written a class that stores some values in a class. I want to
instantiate this on page load or whichever event is appropriate. However when
the page postbacks i want to use the first instantiation of the class until i
submit the page through the submit button. However i cant get it to pass the
class through subsequent requests.
Can anyone help me out with either samples or websites that can help me out
thanks in advance
my code is below
<Serializable()> _
Public Class Ticket
Inherits DictionaryBase
Sub add(ByVal key As String, ByVal av As String)
Me.Dictionary.Add(key, av)
End Sub
Sub remove(ByVal key As String)
Me.Dictionary.Remove(key)
End Sub
Default Overloads Property item(ByVal key As String) As TicketValues
Get
Return CType(Me.Dictionary.Item(key), TicketValues)
End Get
Set(ByVal Value As TicketValues)
Me.Dictionary.Item(key) = Value
End Set
End Property
Private m_ValuesSet As Boolean
Public Property ValuesSet() As Boolean
Get
Return m_ValuesSet
End Get
Set(ByVal Value As Boolean)
ValuesSet = Value
End Set
End Property
End Class
Public Class TicketValues
Private m_TicketField As String
Public Property TicketField() As String
Get
Return m_TicketField
End Get
Set(ByVal Value As String)
m_TicketField = Value
End Set
End Property
End Class
then in my web page i have this code to add to the class
TicketStuff.add("RadList", CType(dr(3), String))
instantiate this on page load or whichever event is appropriate. However when
the page postbacks i want to use the first instantiation of the class until i
submit the page through the submit button. However i cant get it to pass the
class through subsequent requests.
Can anyone help me out with either samples or websites that can help me out
thanks in advance
my code is below
<Serializable()> _
Public Class Ticket
Inherits DictionaryBase
Sub add(ByVal key As String, ByVal av As String)
Me.Dictionary.Add(key, av)
End Sub
Sub remove(ByVal key As String)
Me.Dictionary.Remove(key)
End Sub
Default Overloads Property item(ByVal key As String) As TicketValues
Get
Return CType(Me.Dictionary.Item(key), TicketValues)
End Get
Set(ByVal Value As TicketValues)
Me.Dictionary.Item(key) = Value
End Set
End Property
Private m_ValuesSet As Boolean
Public Property ValuesSet() As Boolean
Get
Return m_ValuesSet
End Get
Set(ByVal Value As Boolean)
ValuesSet = Value
End Set
End Property
End Class
Public Class TicketValues
Private m_TicketField As String
Public Property TicketField() As String
Get
Return m_TicketField
End Get
Set(ByVal Value As String)
m_TicketField = Value
End Set
End Property
End Class
then in my web page i have this code to add to the class
TicketStuff.add("RadList", CType(dr(3), String))