O'Reilly logo

Special Edition Using® Microsoft® ASP.NET by Richard Leinecker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required