N
Nathan Sokalski
During my postbacks, I try to assign the value from an Input tag to a
property of a custom control. However, I keep recieving the following error:
An exception of type 'System.OverflowException' occurred in
Microsoft.VisualBasic.dll but was not handled in user code
Additional information: Arithmetic operation resulted in an overflow.
The code that it highlights during this error is the 2nd line of the
following (Me.Value = postCollection(Me.ID & "_currvalue")):
Public Function LoadPostData(ByVal postDataKey As String, ByVal
postCollection As NameValueCollection) As Boolean Implements
IPostBackDataHandler.LoadPostData
Me.Value = postCollection(Me.ID & "_currvalue")
Return True
End Function
I will admit that this is my first time using the IPostBackDataHandler
interface, but 'System.OverflowException' seems like a very strange
exception for this part of my code, since I am just doing a String
concatenation and an assignment. The value associated with this
postCollection key is a positive integer (well, a string actually, but it
has no negative signs or decimal places, just a couple digits) and Me.Value
is a Property of my Control that is of type Integer, so it shouldn't have
any problem converting, right? If anybody has any ideas as to where I might
be going wrong here, or where I could look to help find the problem, I would
appreciate it. Thanks.
property of a custom control. However, I keep recieving the following error:
An exception of type 'System.OverflowException' occurred in
Microsoft.VisualBasic.dll but was not handled in user code
Additional information: Arithmetic operation resulted in an overflow.
The code that it highlights during this error is the 2nd line of the
following (Me.Value = postCollection(Me.ID & "_currvalue")):
Public Function LoadPostData(ByVal postDataKey As String, ByVal
postCollection As NameValueCollection) As Boolean Implements
IPostBackDataHandler.LoadPostData
Me.Value = postCollection(Me.ID & "_currvalue")
Return True
End Function
I will admit that this is my first time using the IPostBackDataHandler
interface, but 'System.OverflowException' seems like a very strange
exception for this part of my code, since I am just doing a String
concatenation and an assignment. The value associated with this
postCollection key is a positive integer (well, a string actually, but it
has no negative signs or decimal places, just a couple digits) and Me.Value
is a Property of my Control that is of type Integer, so it shouldn't have
any problem converting, right? If anybody has any ideas as to where I might
be going wrong here, or where I could look to help find the problem, I would
appreciate it. Thanks.