In this chapter
The first two chapters looked at Active Server Pages from a high level, discussed distributed application development, and talked about the built-in ASP.NET languages.
In this chapter, you'll see how to use the ASP.NET Request object. This important object runs on the server and you use methods , properties, and collections to program it. You'll learn about the most commonly used Request object and collections, and how to use them in your ASP.NET applications.
As you've already seen, VB, C#, and JScript inside ASP.NET pages enable the server to modify content that is seen in the Web browser. This enables you to collect and display values such as the current date and time and the values of various HTTP variables . You can use this information to make decisions about what to send the client browser, based on known quantities ”such as with data that's based on the current date.
Altering HTML content based on things such as date and time is dynamic, but not active. Visitors to a Web site that simply displays dynamic data based on the date, time, or other variables are passive receptors of information. Their only input to the information path they follow is defined by links they click in the Web pages. So now it's time to consider how to use ASP.NET to actually communicate with the user .
Traditionally, Web browsers have communicated with servers through forms, where information was sent to a server CGI program. The program could then examine this information and produce a new HTML document on the fly to be sent back to the requesting client.
Alternatively, in some situations, the page might have contained hyperlinks that included information about the user's selections. This is often seen in Web search pages where clicking on a link in the page sends one or more values back to the browser. The additional information is appended to the URL to form a query string.
In both of these cases, ASP.NET enables you to collect information that you can use in your code.