
346
|
Chapter 16: The HttpRequest Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
FormElements(Counter1) & "<br/>"
Next Counter1
End If
Else
Form1.Visible = True
End If
End Sub
<!-- This section resides between the <body> and </body> tags -->
<form id="Form1" runat="server">
First Name:
<br/>
<asp:Textbox id="txtFName" runat="server"/>
<br/>
Last Name:
<br/>
<asp:Textbox id="txtLName" runat="server"/>
<br/>
<asp:Button id="Submit" Text="Submit" runat="server"/>
</form>
<asp:label id="Message" runat="server"/>
Notes
The Form collection exposes the same properties and methods described in the
“Collections Reference” section and adds the following methods:
Get(Index|Key)
Returns the contents of the specified item in the NameValueCollection as a
comma-delimited String.
GetValues(Index|Key)
Returns the contents of the specified item in the NameValueCollection as a
String array.
Headers
NameValueCollection = Request.Headers
The Headers collection returns an instance of the NameValueCollection class
containing all HTTP headers sent with the current request. This collection
provides the same information that is returned by calling the Request.ServerVari-
ables collection with the
ALL_HTTP key.
Parameter
NameValueCollection
An Object variable of type NameValueCollection.
Example
The example writes the HTTP headers passed with the request to the ...