"Pro ASP.NET 3.5 Server Controls and AJAX Components"
aspx">
Once the web form is submitted via a button click or a JavaScript submission of the form, ASP.NET parses the input values to allow web form and control code to extract the values and drive the logic of the web application. The variables in an HTTP POST are encoded using HTML encoding rules and are separated in the body of the request via ampersand characters: names=dale+michalk+rob+cameron&task=writebook ASP.NET provides the Form or Params collections attached to the HttpRequest class in the current HttpContext to read the values: string names = Request.Form["names"]; string task = Request.Params["task"]; As you can see, form data is made available on the server through the construct of the ASP.NET postback mechanism and the HttpContext object. Figure 3-3 shows the ASP.NET postback mechanism. Figure 3-3. The ASP.NET postback mechanism CHAPTER 3 ?– A SP.NET S TATE MANAGEMENT 93 Most of the time, when building web applications, developers need to store state information that shouldn??™t be exposed to the user, such as application-specific logic to aid in processing a request. Hidden input fields give developers the ability to store additional information as part of the web form without making the data directly visible to the user.