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.Overflo wException' occurred in
Microsoft.Visua lBasic.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(By Val postDataKey As String, ByVal
postCollection As NameValueCollec tion) As Boolean Implements
IPostBackDataHa ndler.LoadPostD ata
Me.Value = postCollection( Me.ID & "_currvalue ")
Return True
End Function
I will admit that this is my first time using the IPostBackDataHa ndler
interface, but 'System.Overflo wException' 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.
--
Nathan Sokalski
njsokalski@hotm ail.com
property of a custom control. However, I keep recieving the following error:
An exception of type 'System.Overflo wException' occurred in
Microsoft.Visua lBasic.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(By Val postDataKey As String, ByVal
postCollection As NameValueCollec tion) As Boolean Implements
IPostBackDataHa ndler.LoadPostD ata
Me.Value = postCollection( Me.ID & "_currvalue ")
Return True
End Function
I will admit that this is my first time using the IPostBackDataHa ndler
interface, but 'System.Overflo wException' 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.
--
Nathan Sokalski
njsokalski@hotm ail.com
Comment