title: Convert server.createobject from classic ASP to ASP.NET
body: <p>Hi i have a function that was created in ASP classic and want to convert the function in ASP.NET Vb . Below is code that was using in Classic ASP </p>
  
  <pre><code>Function chargeIt(CARD_NUM, EX_MONTH, EX_YEAR, AMOUNT, COMMENT)    
  url = "https://secure.authorize.net/gateway/transact.dll"
  set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") 
  xmlhttp.open "POST", url, false 
  xmlhttp.send "x_description=""Violation Payment For "&amp;COMMENT&amp;"""&amp;x_Version=3.1&amp;x_Delim_Data=True&amp;x_Login=xnxx&amp;x_Tran_Key= 9&amp;x_Amount="&amp;amount&amp;"&amp;x_Card_Num="&amp;card_num&amp;"&amp;x_Exp_Date="&amp;ex_month&amp;ex_year&amp;"&amp;x_Type=AUTH_CAPTURE"
      Dim arrContents(150,0)
  
      contents=split(xmlhttp.responseText,",")
      'response.write(xmlhttp.responseText)
      i=0
      for each value in contents
      arrContents(i,0)=value
      i=i+1
      next
      SELECT CASE arrContents(0,0)
      CASE "1"
          status="Approved"
      END SELECT
  
      chargeIt=status
  end function
  </code></pre>