Abstract

In this chapter, we explore the intricacies of working with server control events. The first part of this chapter is a general discussion of the .NET event architecture. We discuss how to add events to a control, bringing back our favorite TextBox control as part of the demonstration. Then, we illustrate how to define custom events and add them to yet another version of our famous TextBox. We also examine System. Web.UI. Control’s support for maintaining events. Next, we show how to initiate and capture a postback using a Button control that we create named Super Button. This section examines Command events and event bubbling with an example composite control to demonstrate these concepts. In the final portion of the chapter, we bring it all together with a discussion of the page life cycle, focusing on events. Let’s start with a quick overview of events and ASP.NET controls.

Fulltext Preview

Image of the first page of the fulltext document