In my ASP.Net MVC application, I have to call to one user defined function. Whenever the page is refreshed, this function is called. Now what is the problem, for the first time, it runs perfect. But when I refresh, as I have put the breakpoint, it goes up and down repeatedly.
That means, debugger goes to line1, will run more than one time, then goes to second line, goes to third line, goes to first line, and so on. I have attached photos below. I am developing applications in MVC4.
First image is first time run. In second image, the line connection.Open() runs three times. It happens for every line. Debugger goes up and down abruptly. I don't know what is wrong with this. Can anybody explain this? Thank you.



