"Pro ASP.NET 3.5 Server Controls and AJAX Components"
The SubmitPageButton control has no event-handling routines defined, and our Page_Load event handler is blank, so the net result of clicking the button is a recycling of the web form without any explicit web form code. In this sample page, the only action in the controls is getting and setting properties during the page life cycle through postback. The controls are involved in regenerating their HTML content and the possibility of taking advantage of the ViewState that was posted back from the client. In Figure 3-10, you can see that the StatefulLabel control was able to remember its previous Text property value, while the StatelessLabel control reverted to the initial value set in its Text attribute as part of the .aspx page markup. 108 CHAPTER 3 ?– ASP.NET S TATE MANAGEMENT Figure 3-10. LabelControls.aspx after the Submit Page button postback Form Post Data and ASP.NET Controls The postback mechanism in ASP.NET provides a means of generating client-side state as well as the opportunity to receive input from the user. The first part of this chapter concentrated on client-side state. Now, we focus on interacting with the normal HTML form input elements. Many controls model themselves after tags and provide value-added features, such as remembering state and raising events to their clients when internal state changes occur.