0

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?

1

Ok, I've fixed it. But I seriously doubt whether this is a bug in SP 2010. In the web part class I just commented the OnInit() method and it worked. This was the method -

/// <summary>
/// init
/// </summary>
/// <param name="e"></param>
protected override void oninit(eventargs e)
{
    this.title = "My Title";
}

Any comments on this?

  • Possible you need to set this.ID instead? – Kit Menke Jul 14 '11 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.