title: Cant use any string functions on xmlhttp response text in VBScript
body: <p>I can't do anything with the response text from the below code other than print it to the screen. I want to use an if statement to check what the response text is,but whenever I try this it prints nothing.</p>
  
  <p>For the sake of this example, assume the response text is "2"</p>
  
  <p>Code:</p>
  
  <pre><code>Set xmlhttp = server.CreateObject("MSXML2.XMLHTTP")
  xmlhttp.open "POST", url,false
  xmlhttp.setRequestHeader "Content-Type", "text/xml"
  message = "test example"
  xmlhttp.send(message)
  
  if xmlhttp.responseText = "2"
  response.Write("Found a 2")
  end if
  </code></pre>
  
  <p>What's happening is if I just have response.Write(xmlhttp.responseText) it will print out the two, but when I try and do any string functions on the response text it ignores it and prints nothing</p>
  
  <p>Any help appreciated</p>