Stack Overflow

Have a desktop app that I copied and made into a Web app, with a few changes.

The app load two listboxes from a MySQL database located on my server.

After the listboxes are loaded up when I select a row in one of the listbox, either one, in the change/SelectionChange event it scan the other listbox looking for a matching serial number. When found it select it ( LB.listindex=i). That instruction result in the change/SelectionChange event for that listbox to fire. And it bounces back and forth for awhile.

The web app get a stack overflow exception, the desktop does not. One of the list box has about 15 row and the other about 30.

Why is the web catching the error and the desktop not? Is it because the web has a smaller stack?

The bug has been fixed.

maybe because the desktop has a check there to make sure the event does not fire if triggered inside the event?

Use a flag boolean property in your search method to prevent the SelectionChange code to execute if the change is the result of the search.

That should prevent the back and forth.