O'Reilly logo

ASP.NET by Example by Steven A. Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Templates

Within your custom control, it is possible to add support for user-defined templates, such as the ones that you learned about in Chapter 5, “HTML/Web Controls.” Again, one of the great things about ASP.NET is that you have as much control over your custom controls as Microsoft has when they build their controls. If you see a feature of an existing control, such as the Repeater, that you'd like to implement in your own custom control, you can!

Templates are all about user interface. They allow your control to define one or more templates that can be customized by the user. Your control then defines when and how these templates are rendered. A common use for templates in the list controls was to have an ItemTemplate and an AlternateItemTemplate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required