Hi there, phread. I walked through the Structure Demo, and I also didn't have an exception thrown when I click on the[List Customer] button a second time.
But...
I am wondering if you might be expecting the data within the "lstCustomers" listbox that was populated on the very first[List Customer] button click, to then be cleared so that "lstCustomers" is blank when "btnListCustomer" is clicked the second time.
The[List Customer] button does indeed clear the list, but also calls on the CreateCustomer method, and ends-up repopulating "lstCustomer" with the same data.
The lesson didn't call for it, but I suppose you could add a new button (say, a "Clear Form" button), that would show "lstCustomers" cleared and emptied, and I wonder if that's the behavior that you were expecting.
|