i

ASP.Net A Complete Guide

HTTP Collections

  • Collections are the properties of the HttpRequest.

  • The Collections are present in the "System.Collections.Specialized" namespace.

  • It is also called as NamedValueCollection.

  • We can access the value from the string key.

  • The below example shows the Server variable collection by using this how we can read the value of QUERY_STRING and HTTP_USER_AGENT.

Dim queryStr As String = Request.ServerVariables ("QUERY_STRING")

Dim agentStr as String = Request.ServerVariables ("HTTP_USER_AGENT")

Collection:

Property

Meaning

Cookies

Collection of cookies sent by the client

 Form

form variables

Headers

HTTP headers

ServerVariables

Contains all the server variable values