Please take this in the best possible way but you really need to take a step back and learn some of the basics of web development. Taking a day or two to learn the basics is going to save you ten times that amount in patching and modifying code that is inherently poor.
In your page at the moment you have some server side script that sets the value of "multileg", you then insert this into your hidden field:
Code:
value="<%=multileg%>"
So when you submit the form it resets this to "true" and you go into your endless loop. Either you need to set this to false after the first submission or you need to re-evaluate why you are doing all this and re-design the application.
Good Luck
--
Joe (
Microsoft MVP - XML)