Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.83 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to check if client computer is running a 32-bit or 64-bit OS
  2. System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")
  3.        
  4. if (!IsPostBack) {
  5.             int loop1, loop2;
  6.             NameValueCollection coll;
  7.  
  8.             // Load ServerVariable collection into NameValueCollection object.
  9.             coll = Request.ServerVariables;
  10.             // Get names of all keys into a string array.
  11.             String[] arr1 = coll.AllKeys;
  12.             for (loop1 = 0; loop1 < arr1.Length; loop1++) {
  13.                 Response.Write("Key: " + arr1[loop1] + "<br>");
  14.                 String[] arr2 = coll.GetValues(arr1[loop1]);
  15.                 for (loop2 = 0; loop2 < arr2.Length; loop2++) {
  16.                     Response.Write("Value " + loop2 + ": " + Server.HtmlEncode(arr2[loop2]) + "<br>");
  17.                 }
  18.             }
  19.         }