FindControl() method throws ArithmeticException?
Posted
by Mark Struzinski
on Stack Overflow
See other posts from Stack Overflow
or by Mark Struzinski
Published on 2008-09-17T17:24:49Z
Indexed on
2010/06/05
11:42 UTC
Read the original article
Hit count: 180
I have a line of C# in my ASP.NET code behind that looks like this:
DropDownList ddlStates = (DropDownList)fvAccountSummary.FindControl("ddlStates");
The DropDownList control is explicitly declared in the markup on the page, not dynamically created. It is inside of a FormView control. When my code hits this line, I am getting an ArithmeticException with the message "Value was either too large or too small for an Int32." This code has worked previously, and is in production right now. I fired up VS2008 to make some changes to the site, but before I changed anything, I got this exception from the page. Anyone seen this one before?
© Stack Overflow or respective owner