CHAPTER 31

image

Creating Custom Controls

In this chapter we show you the core techniques required to create custom controls: how to create and register controls, how to manage the IDs that controls use, how to create controls that can be configured through declarative elements, and how to write HTML from server controls.

These features underpin all ASP.NET controls, and understanding them will help you apply the built-in controls that we describe later in this part of the book and—most importantly—help you figure out what’s going on when you don’t get the behavior you expect. If you just want to start applying built-in controls to your projects, you ...

Get Pro ASP.NET 4.5 in C#, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.