Last post Mar 17, 2009 09:34 PM by Allen Chen – MSFT
Mar 16, 2009 08:46 AM|grazza98|LINK
I've just posted a similar question on why you need server controls when you can pre-compile usercontrols and redistribute them.
I've seen lots of (usercontrol vs web part) but not much on web part vs custom server control.
According to the MSDN site you can put web parts onto a normal asp.net page outside of a web part zone and they behave just like custom server controls. So, if you are creating a bunch of controls for redistribution to customer asp.net sites and/or SharePoint
sites why don't you just create Web Parts?
This way you get normal server control behaviour when in an asp.net site and can make use of the web part framework when in a web part type page (e.g. SharePoint).
Mar 17, 2009 09:34 PM|Allen Chen – MSFT|LINK
WebPart itself is a built-in web control. Comparing it with custom control is just like comparing Panel control with custom control (actually WebPart derives from Part and Part derives from Panel), which doesn't make
much sense, I think.
When writing custom control we're free to write a class deriving from an existing built-in control. So of course it can derive from WebPart control.