I am converting a classic ASP application to a .NET 2.0 application and I am having problems trying to figure out how to pass parameters when making the HTTP call.
In my classic ASP I have the following code
strSend = "fields="&returnFields&"&pernr="&eIDs
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "POST", "http://mypioneer.phibred.com/ews/post", False
xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xml.Send strSend - where I am passing the parameters
In the ASP.NET page I have coded so far
Dim strPostData
As String =
"fields=" & strFieldInfo &
"&username=" & strUsername
Dim myHttpWebRequest
As HttpWebRequest = WebRequest.Create(
"http://mypioneer.phibred.com/ews/post")
myHttpWebRequest.Method = "post"
myHttpWebRequest.ContentType = "application/x-www-form-urlencoded"
I can figure what method to use so I can pass the strPostData as the parameter like it was done in the classic ASP sample above.
I appreciate your help.