I've created a custom web part and I've added three instances of the same web part in a page. If I try to edit the second web part it is opening the tool part for the third web part.
In fact whatever web part I edit it just opens the tool part of the instance of the web part that is added in the page in the last (latest). If I have added 10 web parts editing any web part from 1-9 just opens the tool part of the 10th instance of the web part.
Any ideas?