What is the difference between Web User Control
and Web Custom Control
?
If your control has a lot of static layout, a user control might make sense. If your control is mostly dynamically generated — for instance rows of a data-bound table, nodes of a tree view, or tabs of a tab control — a custom control would be a better choice.
The main differences between the two types are outlined in this table:
Web user controls | Web custom controls |
---|---|
1. Easier to create | 1. Harder to create |
2. Limited support for consumers who use a visual design tool | 2. Full visual design tool support for consumers |
3. A separate copy of the control is required in each application | 3. Only a single copy of the control is required, in the global assembly cache |
4. Cannot be added to the Toolbox in Visual Studio | 4. Can be added to the Toolbox in Visual Studio |
5. Good for static layout | 5. Good for dynamic layout |
Read more detailed article here.