0
votes

I have a classic asp app that uses MSXML2.ServerXMLHTTP to pass data to an API via querystring, and read\process the response. I am testing out ASP.Net Web Pages (this is not MVC 4) and trying to port this, but have no idea how.

Here is a subset of the original classic asp (vbscript) code:

PostData = "variable1=test"
PostData = PostData & "variable2=test"

'Send the transaction info as part of the querystring
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

xml.open "POST", "https://www.domain.com/api/file.aspx?" & PostData & "", false
xml.send ""
strStatus = xml.Status
strRetval = xml.responseText
set xml = nothing

Results = split(strRetVal, ",", -1)
responseCode                = Results (0)
responseReasonCode          = Results (1)
responseId                  = Results (2)

If (responseCode = 1) then
    newID = responseId
END IF

How can I accomplish this with ASP.Net Web Pages? Remember, web pages is differnt but similar to MVC (http://www.asp.net/web-pages).

1

1 Answers

0
votes

Asp.Net is Asp.net :)

WebPages is actually more akin to classic ASP style not MVC :)

Hth...