IN THIS CHAPTER
In this chapter, you learn how to develop custom controls for the ASP.NET framework. I divided the topic of building custom controls into two chapters. In this chapter, I discuss all the basic topics of control development. In the next chapter, I cover more advanced topics, such as using templates and binding to a data source. Here, you start with a simple control. In the first section, you learn how to build a custom control that displays the text "Hello World!" . Next, you jump deeper into the details of control building. You examine such topics as how to manipulate the output of a control by using HtmlTextWriter and how to add methods, properties, and events to a control. You also examine the subject of building controls from existing controls. You learn how to build composite controls and inherit new controls from existing controls. Finally, you learn how to access the current HTTP context from within a control. I discuss how you can access the Request and Response objects and retrieve information about browser capabilities through a control's Context property. |