ServerVariables

Another collection provided by the Request object is ServerVariables. Any HTTP header that is sent by a client browser is available in this collection with code such as the following:

Dim strValueData as String 
strValueData = Request.ServerVariable( “HeaderType” ) 

The standard HTTP headers are automatically defined as members of the ServerVariables collection. For example, when form data is sent to the server, the method by which it was sent can be determined from

Dim strRequestMethod as String 
strRequestMethod = Request.ServerVariables( “REQUEST_METHOD” ) 
' Either GET or POST 

You can also use the QUERY_STRING header to obtain the original unadulterated query string that was passed to the server from the browser. A great ...

Get Special Edition Using® Microsoft® ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.