Changing WebPart properties
Some things are just not obvious, or maybe I am just getting spoiled. Well, I just spent a couple of hours trying to figure out why Sharepoint didn't bother to persist my changed WebPart Title property through postbacks. First I thought this was due to my UserControl approach, and was caused by the ASP.NET UserControl beeing routed around Sharepoints ISAPI stuff.
Then I noticed that the main property of my webpart, which is a WebPart Connection Consumer class btw, was reset on postback. My Cell Provider webpart calls the consumer correctly and the property CompanyID which is marked with the attribute WebPartStorage(Storage.Personal) is set in the CellReady eventhandler of the consumer. I naturally assumed that this would be stored in Storage.Personal because of the attribute marking.
Enter protected bool WebPart.SaveProperties. Nuff said...