I've been looking to override the WebPartManager's CreateWebPart to return a customized WebPart that contains properties that will appear when the part is edited.
I have created a Class that Inherits from WebPart and added some Personalizable, WebBrowsable Properties.
Now, I want those Properties to be available to Controls that were placed in the ZoneTemplate of a WebPartZone.
In the overridden CreateWebPart function, I try to return my own customized WebPart Class where I pass in the control and it gets added in the CreateChildControls, but it pukes because it isn't of type GenericWebPart.
I tried creating a Class that Inherits from GenericWebPart and just copying those properties from the customized WebPart Class into it, but I'm afraid they wouldn't apply since it is a GenericWebPart.
My Q: What needs to happen to have complete control over the CreateWebPart method?
Thanks,
Nathan