K
Kirk Graves
I am in the process of developing a WebControl. Everything works fine,
except that viewstate does not seem to be working. can anyone give me some
clue
Thank you in advance.
here is the code that is causing me trouble
-------------------------------------
Protected Overrides Function SaveViewState() As Object
Me.ViewState.Add("Month", ddlYear.ClientID)
Return MyBase.SaveViewState()
' at this point the value is showing correctly when queried in the
immediate window
End Function
Protected Overrides Sub LoadViewState(ByVal savedState As Object)
Dim MonthID As String
Dim YearID As String
MyBase.LoadViewState(savedState)
Month = Convert.ToDateTime(viewstate("Month"))
' Month now is nothing ????
End Sub
except that viewstate does not seem to be working. can anyone give me some
clue
Thank you in advance.
here is the code that is causing me trouble
-------------------------------------
Protected Overrides Function SaveViewState() As Object
Me.ViewState.Add("Month", ddlYear.ClientID)
Return MyBase.SaveViewState()
' at this point the value is showing correctly when queried in the
immediate window
End Function
Protected Overrides Sub LoadViewState(ByVal savedState As Object)
Dim MonthID As String
Dim YearID As String
MyBase.LoadViewState(savedState)
Month = Convert.ToDateTime(viewstate("Month"))
' Month now is nothing ????
End Sub