SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 160 | Next

Rob Cameron and Dale Michalk

"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.


Pages:
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6