* You are viewing the archive for October, 2011

List deleted / deleting event receivers not being hit when a site gets deleted

This will be a very short blog with a finding we did today. If you have event receivers on your lists like:

  • ListDeleting
  • ListDeleted

These don’t get hit when the parent site gets deleted, meaning you have to be very careful with it. If you really want to execute the logic that is contained within those events, you need to do it in the WebDeleted / WebDeleting events aswell.

Preventing the use of webparts in specific sites

For a recent project we had a business request to prevent the use of certain webparts in a specific site definition.

Our initial investigation showed us that there is not that many information to be found on this subject so we decided it was time to share some information on the subject.

There are a few ways of implementing this, but each one of them has its advantages and drawbacks.

You can for example – in the case of custom webparts – implement custom logic to forcefully prevent the use of webparts in certain sites. This big … Continue Reading