One technique of building custom placeholder controls is to create Web Custom Controls that inherit directly from the BasePlaceholderControl
class. This is probably the most popular and also the best documented method. The result is a set of Web Custom Controls that can be distributed to any MCMS web project that requires them.
Don't confuse Web Custom Controls with the Web User Controls we built in Chapter 13. The table below lists the differences between the two.
Web Custom Control |
Web User Control |
Re-usable across multiple projects. Compiled into a library file that can be referenced by any project. If you are building a control that could be used across multiple projects, consider using Web Custom Controls instead of Web User Controls. |
Good for use only within the project file. If we wanted to share it with another project, we would have to duplicate the code. |
Generally harder to create. All logic has to be coded from within a code-behind... |