“Object Has Been Deleted” Error Message When You Try to Save a New Page
Symptoms
When you save a posting that contains a SingleImagePlaceholderControl edit controlwith a custom placeholder control on the template, and the custom placeholder control that you create contains handle exceptions, an error occurs if the handle exception is called in the custom placeholder control logic. When the handle exception is called, the error is not caught correctly, and you receive the following error message in Microsoft Internet Explorer:
Object has been deleted. An attempt was made to access the properties or methods of an object that was deleted by the current session. For more information about the error message, see the “More Information” section.
Resolution
When you save a new posting with a custom placeholder, the placeholder calls the CmsHttpContext.Rollback() function if an error occurs in the placeholder. The next problem is that the <this.BoundPlaceholder>.Datasource property contains an error, and <this.BoundPlaceholder> is the name of a placeholder object. If any action is attempted on the <this.BoundPlaceholer>.Datasource property after the rollback, the error occurs. The error does not occur after the page has been saved and the rollback is called.
