Category Archives: Development

ASP.NET Custom Controls

While developing web applications and sites sooner or later you will end up creating controls.

Even if its not apparent in the first few looks, its would be helpful to keep in mind that has two types of custom controls.

And sometimes you might find that one type is better suited for your need at hand than the other. Also keep in mind that while staring make sure you know what kind of control you would be creating as its not easy to switch to the other type without redesignin the whole idea from scratch.

The main differences between the two types are outlined in this table:

Web user controls Web custom controls
Easier to create Harder to create
Limited support for consumers who use a visual design tool Full visual design tool support for consumers
A separate copy of the control is required in each application Only a single copy of the control is required, in the global assembly cache
Cannot be added to the Toolbox in Visual Studio Can be added to the Toolbox in Visual Studio
Good for static layout Good for dynamic layout

ASP.NET Custom Controls