Mutually dependent drop-downs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 drop-downs on my web form. I need to make the contents of the second
one dependent on the choice from the first. How? I tried removing the
existing entries from the second listbox and reloading with new values but I
got an error "collection was modified, enumeration operation may not
execute". I am clueless what this means.
 
Well, it would be very helpful if you showed the code you were running when
this exception is thrown. We can't guess what code you have written.

I suspect you have a for each loop and you are trying to modify the
collection you are looping through. Just a guess since you didn't bother
posting the code.
 
I have it working now, I just replaced the FOR...EACH loop with a DO WHILE
loop and now it works perfectly.
 
Back
Top