Creating Custom Controls

For most ASP developers, user controls might be enough to boost their productivity. However, Visual Basic programmers moving to ASP.NET might be a little disappointed by the lack of designer support. More important, user controls aren't the ideal type of control for third-party developers to distribute. Third-party developers have been essential to the growth of Visual Basic throughout its history, and it's safe to assume that they will be essential to the next phase of Visual Basic .NET and C# development within ASP.NET.

The solution to the limitations of user controls is custom controls. Custom controls are server controls that derive from a base control class and are compiled into a DLL. Custom controls have great design-time support within Visual Studio .NET. The trade-off is that they're harder to build, and if a control needs to have a different appearance in different circumstances (for example, in multiple syndications that each have a different look), the change in appearance must be made by changing the values of parameters.

0 0

Post a comment