An unhandled exception of type 'System.StackOverflowException' occurred

Posted by Kmore1981 under ASP.NET on 4/26/2014 | Points: 10 | Views : 529 | Status : [Member] | Replies : 1
We have lot of text boxes in our .ascx file. Earlier our framework was 2.0. Now we opened the solution in Visual Studio 2013 & it changed the framework to 4.5. On top portion of .ascx file we have defined few javascript functions. Few javascript functions have large number of lines. These javascript functions are defined for certain calculation like to calculate totals, opening stock, balances etc. Having lot of text boxes is need of the page. We can not reduce number of text boxes and javascript. Also javascript functions are referring these text boxes using code as = document.getElementById('<%=txtOpeningStockProd1.ClientID%>').value;
Earlier on 2.0 it was running smoothly. But today we changed the framework to 4.5 and it has started to show error as follows,

An unhandled exception of type 'System.StackOverflowException' occurred in App_Web_l5hbm3c4.dll

I emptied all the javascript functions definitions (removed function body) and kept their names as it is like following

function valInputs()
return true;

function showProductShortName()

When I am running the program with javascript function definitions as above, then its showing the entire page. But when I started to include javascript function definitions one by one, after certain capacity, it started to raise exception as "An unhandled exception of type 'System.StackOverflowException' occurred in App_Web_l5hbm3c4.dll"

We googled a lot and tried all answers found but still could not succeed. Please help me to resolve this issue.

Kiran More


Posted by: Vuyiswamb on: 4/30/2014 [Member] [MVP] [Administrator] NotApplicable | Points: 25

You have a function that call itself

Thank you for posting at Dotnetfunda

Kmore1981, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response