Chapter 28. Developing Custom Controls


  • Creating a Simple Control

  • Using HtmlTextWriter

  • Adding Properties and Methods to Controls

  • Parsing Inner Content

  • Adding Child Controls to a Control

  • Examining Custom Controls and Events

  • Participating in Postbacks

  • Creating Composite Controls

  • Inheriting from Existing Controls

  • Accessing the Current Context

  • Debugging Controls

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.

ASP.NET Unleashed
ASP.NET 4 Unleashed
ISBN: 0672331128
EAN: 2147483647
Year: 2003
Pages: 263

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: