Created
December 4, 2015 14:42
-
-
Save javierguerrero/20dbcd795a89601fa1e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int loop1, loop2; | |
// Load ServerVariable collection into NameValueCollection object. | |
var coll = Request.ServerVariables; | |
// Get names of all keys into a string array. | |
String[] arr1 = coll.AllKeys; | |
for (loop1 = 0; loop1 < arr1.Length; loop1++) | |
{ | |
Response.Write("Key: " + arr1[loop1] + "<br>"); | |
String[] arr2 = coll.GetValues(arr1[loop1]); | |
for (loop2 = 0; loop2 < arr2.Length; loop2++) | |
{ | |
Response.Write("Value " + loop2 + ": " + Server.HtmlEncode(arr2[loop2]) + "<br>"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment